Skip to content

added github actions for the devenv operator #3

added github actions for the devenv operator

added github actions for the devenv operator #3

name: Build Developer Environment Operator
on:
push:
branches:
- main
paths:
- 'devenv-operator/**'
pull_request:
branches:
- main
paths:
- 'devenv-operator/**'
workflow_dispatch:
defaults:
run:
working-directory: devenv-operator
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22'
- run: pwd
- name: Build
run: make build
- name: Test
run: go test ./... -coverprofile cover.out
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
run: make docker-build docker-push