From 5ffe3aa1515d0a27f8feb21e41d24c71d70ebcf9 Mon Sep 17 00:00:00 2001 From: Salvatore Girolamo Date: Fri, 30 Apr 2021 13:58:40 +0200 Subject: [PATCH] pushing docker container to GHCR --- .github/workflows/docker.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 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 0000000..cb082f4 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,29 @@ +name: Deploy Docker + +# Run workflow on tags starting with v (eg. v2, v1.2.0) +on: + push: + tags: + - v* + +jobs: + Deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v1 + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_REGISTRY_TOKEN }} + - name: Build and Push Docker Image + uses: docker/build-push-action@v2 + with: + context: . + file: utils/container/Dockerfile + push: true # Will only build if this is not here + tags: | + ghcr.io/${{ github.repository }}:${{ github.ref }} + ghcr.io/${{ github.repository }}:latest