diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml new file mode 100644 index 0000000000..d065ea0bce --- /dev/null +++ b/.github/workflows/build-docker.yml @@ -0,0 +1,34 @@ +name: "build container image" + +on: + push: + branches: + - main +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version: '1.22' + id: go + - name: Build binary + run: | + make managers + - name: 'Login to GitHub Container Registry' + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} + - name: build container image + env: + REGISTRY: ghcr.io/absaoss + TAG: v2.7.2 + run: | + make docker-build + - name: publish image + run: | + docker push ghcr.io/absaoss/cluster-api-provider-aws:v2.7.2