From 625248c4c6c8321910f7712ee434950210c9835c Mon Sep 17 00:00:00 2001 From: Dinar Valeev Date: Tue, 19 Nov 2024 23:51:27 +0100 Subject: [PATCH] Add image build action Signed-off-by: Dinar Valeev --- .github/workflows/build-docker.yml | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/build-docker.yml 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