Skip to content

Commit

Permalink
ci: deploy fixed version
Browse files Browse the repository at this point in the history
  • Loading branch information
dd84ai committed Jan 10, 2025
1 parent 6f22615 commit ff44e6e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/docker-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ jobs:
steps:
- name: Check out source repository
uses: actions/checkout@v2
- run: |
- name: Get version from tag
run: |
set -x
echo "BUILD_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
id: version
- name: Docker login
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login --username darkwind8 --password-stdin
- name: Install Darklab ssh key
Expand All @@ -38,13 +40,13 @@ jobs:
set -ex
docker pull darkwind8/darkstat:staging
sleep 5
docker tag darkwind8/darkstat:staging darkwind8/darkstat:$
docker push darkwind8/darkstat:$
docker tag darkwind8/darkstat:staging darkwind8/darkstat:${{ steps.version.outputs.BUILD_VERSION }}
docker push darkwind8/darkstat:${{ steps.version.outputs.BUILD_VERSION }}
sleep 5
- name: Retag from ${{ steps.version.outputs.BUILD_VERSION }} to production
run: |
set -ex
docker tag darkwind8/darkstat:$ darkwind8/darkstat:production
docker tag darkwind8/darkstat:${{ steps.version.outputs.BUILD_VERSION }} darkwind8/darkstat:production
docker push darkwind8/darkstat:production
sleep 5
- name: Switch service image darkwind8/darkstat for swarm to new one
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ jobs:
- name: Retag from ${{ steps.version.outputs.BUILD_VERSION }} to staging
run: |
set -ex
docker tag darkwind8/darkstat:$ darkwind8/darkstat:staging
docker tag darkwind8/darkstat:${{ steps.version.outputs.BUILD_VERSION }} darkwind8/darkstat:staging
docker push darkwind8/darkstat:staging
sleep 5
- name: Retag from ${{ steps.version.outputs.BUILD_VERSION }} to latest
run: |
set -ex
docker tag darkwind8/darkstat:$ darkwind8/darkstat:latest
docker tag darkwind8/darkstat:${{ steps.version.outputs.BUILD_VERSION }} darkwind8/darkstat:latest
docker push darkwind8/darkstat:latest
sleep 5
- name: Switch service image darkwind8/darkstat for swarm to new one
Expand Down

0 comments on commit ff44e6e

Please sign in to comment.