Skip to content

Commit

Permalink
workflow fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalyu committed Oct 6, 2020
1 parent 8bd202d commit 04cff9c
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,7 @@ jobs:
docker build --rm --tag centos_local .
docker run --rm centos_local bash -c '/version-info.sh'
- name: Push to dodopizza/centos:latest
if: github.ref == 'refs/heads/latest'
run: |
docker tag centos_local ${centos_repo_main}:latest
docker tag centos_local ${centos_repo_dev}:latest
docker push ${centos_repo_main}:latest
docker push ${centos_repo_dev}:latest
- name: Push to dodopizza/centos-dev:branch_short_sha
if: github.ref != 'refs/heads/latest'
- name: Push to dodopizza/centos-dev:<branch_short_sha>
run: |
branch_short_sha=$( echo ${{ github.ref }} | sha1sum | cut -c1-6 )
docker tag centos_local ${centos_repo_dev}:${branch_short_sha}
Expand All @@ -49,3 +40,11 @@ jobs:
echo
echo "Dev image tag: ${centos_repo_dev}:${branch_short_sha}"
echo
- name: Push to dodopizza/centos:latest and dodopizza/centos-dev:latest
if: github.ref == 'refs/heads/latest'
run: |
docker tag centos_local ${centos_repo_main}:latest
docker tag centos_local ${centos_repo_dev}:latest
docker push ${centos_repo_main}:latest
docker push ${centos_repo_dev}:latest

0 comments on commit 04cff9c

Please sign in to comment.