Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Commit

Permalink
Fix release tags
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaretskyi committed Jun 15, 2021
1 parent a68aead commit b5b1b47
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set tag name
id: tag_name
run: |
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Build docker image
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/worldcoin/hubble-commander:${GITHUB_REF#refs/tags/}
tags: ghcr.io/worldcoin/hubble-commander:${{ steps.tag_name.outputs.SOURCE_TAG }}

deploy:
name: Deploy to AWS
Expand All @@ -33,6 +37,10 @@ jobs:
matrix:
host: [ec2-3-238-223-141.compute-1.amazonaws.com, ec2-3-239-149-30.compute-1.amazonaws.com]
steps:
- name: Set tag name
id: tag_name
run: |
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Deploy to AWS
uses: appleboy/ssh-action@master
with:
Expand All @@ -42,4 +50,4 @@ jobs:
script: |
docker-compose pull
docker-compose up -d
docker images -f "before=ghcr.io/worldcoin/hubble-commander:${GITHUB_REF#refs/tags/}" -f "dangling=true" -q ghcr.io/worldcoin/hubble-commander | xargs docker image rm || true
docker images -f "before=ghcr.io/worldcoin/hubble-commander:${{ steps.tag_name.outputs.SOURCE_TAG }}" -f "dangling=true" -q ghcr.io/worldcoin/hubble-commander | xargs docker image rm || true

0 comments on commit b5b1b47

Please sign in to comment.