From bc6e8dd2e0c783cb6d24e31e55650c28f51d6822 Mon Sep 17 00:00:00 2001 From: Ben Grant Date: Tue, 16 May 2023 17:37:35 +1000 Subject: [PATCH] Use ghcr tag directly --- .github/workflows/deploy_api.yml | 9 ++++++--- README.md | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy_api.yml b/.github/workflows/deploy_api.yml index 676b701..32b097e 100644 --- a/.github/workflows/deploy_api.yml +++ b/.github/workflows/deploy_api.yml @@ -20,6 +20,9 @@ jobs: contents: read packages: write + outputs: + tag: ${{ steps.meta.outputs.tags[0] }} + steps: - uses: actions/checkout@v3 - uses: docker/login-action@v2 @@ -39,7 +42,7 @@ jobs: labels: ${{ steps.meta.outputs.labels }} deploy: - needs: [build-and-push] + needs: build-and-push name: Deploy to EC2 runs-on: ubuntu-latest @@ -51,7 +54,7 @@ jobs: key: ${{ secrets.EC2_SSH_KEY }} script: | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} - docker pull ${{ env.REGISTRY }}/${{ github.repository }}/api:main + docker pull ${{ needs.build-and-push.outputs.tag }} docker stop crabfit-api docker rm crabfit-api - docker run -d -p 3000:3000 --name crabfit-api --env-file ./.env ${{ env.REGISTRY }}/${{ github.repository }}/api:main + docker run -d -p 3000:3000 --name crabfit-api --env-file ./.env ${{ needs.build-and-push.outputs.tag }} diff --git a/README.md b/README.md index 8ba0b35..8526b8b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Crab Fit avatar +# Crab Fit avatar Align your schedules to find the perfect time that works for everyone. Licensed under the GNU GPLv3.