From ff5781ec64c5218d26a284cc850c41dcf00bc46a Mon Sep 17 00:00:00 2001 From: Robin Straub Date: Sun, 21 May 2023 14:06:56 +0200 Subject: [PATCH 1/2] ci: add docker build action --- .github/workflows/docker.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 000000000000..0f61c91f7e9b --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,34 @@ +name: Build and Push Docker Image + +on: + release: + types: + - created + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - 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 Docker image + uses: docker/build-push-action@v2 + with: + context: . + push: true + file: infra/docker/Dockerfile + tags: > + ghcr.io/${{ github.repository }}:latest, + ghcr.io/${{github.repository }}:${{ github.event.release.tag_name }} From 3e50457f9d53724a10c4c50db7a4a1daa3bbaf78 Mon Sep 17 00:00:00 2001 From: Robin Straub Date: Sun, 21 May 2023 14:40:01 +0200 Subject: [PATCH 2/2] fix: invalid docker path --- .github/workflows/docker.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 0f61c91f7e9b..723c1b65d7c9 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -4,6 +4,9 @@ on: release: types: - created + push: + branches: + - ci/add-docker-build-action jobs: build-and-push: @@ -28,7 +31,7 @@ jobs: with: context: . push: true - file: infra/docker/Dockerfile + file: docker/Dockerfile tags: > - ghcr.io/${{ github.repository }}:latest, - ghcr.io/${{github.repository }}:${{ github.event.release.tag_name }} + ghcr.io/${{ github.repository }}:latest +# ghcr.io/${{github.repository }}:${{ github.event.release.tag_name }}