From 95efc147248afdf9f5f0c7aed23628f298af95d2 Mon Sep 17 00:00:00 2001 From: Nicholas Rodrigues Lordello Date: Mon, 20 Mar 2023 11:34:45 +0100 Subject: [PATCH] Add Docker deployment workflow --- .github/workflows/deploy.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 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..715aebc --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,32 @@ +name: deploy +on: + push: + branches: [main] + tags: [v*] + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v3 + + - uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - uses: docker/metadata-action@v4 + id: meta + with: + images: ghcr.io/${{ github.repository }} + - uses: docker/build-push-action@v4 + with: + context: . + file: Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}