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
+# Crab Fit
Align your schedules to find the perfect time that works for everyone.
Licensed under the GNU GPLv3.