From ff5781ec64c5218d26a284cc850c41dcf00bc46a Mon Sep 17 00:00:00 2001 From: Robin Straub Date: Sun, 21 May 2023 14:06:56 +0200 Subject: [PATCH] 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 }}