From a63fa036905596ac3e15a354e3834fe7a6dcb6bd Mon Sep 17 00:00:00 2001 From: Julian Lemmerich <41118534+JM-Lemmi@users.noreply.github.com> Date: Fri, 12 Nov 2021 17:05:52 +0100 Subject: [PATCH] Create deploy.yml --- .github/workflows/deploy.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..9777659 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,27 @@ +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: JM-Lemmi + password: ${{ secrets.GHCR_TOKEN }} + - name: Build and Push Docker Image + uses: docker/build-push-action@v2 + with: + push: true # Will only build if this is not here + tags: | + ghcr.io/${{ github.repository }}:${{ github.ref }} + ghcr.io/${{ github.repository }}:latest