From 6718d9d8a8ec2422a7086b32a230688f6363fe78 Mon Sep 17 00:00:00 2001 From: Soohyun Kim Date: Tue, 7 Dec 2021 13:34:01 +0100 Subject: [PATCH] METAL-3173/publish docker image when release is published or edited --- .../{release.yaml => chart-release.yaml} | 0 .github/workflows/image-publish.yaml | 28 +++++++++++++++++++ 2 files changed, 28 insertions(+) rename .github/workflows/{release.yaml => chart-release.yaml} (100%) create mode 100644 .github/workflows/image-publish.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/chart-release.yaml similarity index 100% rename from .github/workflows/release.yaml rename to .github/workflows/chart-release.yaml diff --git a/.github/workflows/image-publish.yaml b/.github/workflows/image-publish.yaml new file mode 100644 index 00000000..95c9bc8f --- /dev/null +++ b/.github/workflows/image-publish.yaml @@ -0,0 +1,28 @@ +name: Publish Docker image + +on: + release: + types: [published, edited] + +jobs: + build_and_release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + push: true + tags: ghcr.io/kloeckner-i/db-operator:${{ github.event.release.tag_name }} \ No newline at end of file