Skip to content

Commit

Permalink
fix: try out docker image push by tags
Browse files Browse the repository at this point in the history
  • Loading branch information
kobenguyent committed Jun 20, 2023
1 parent 97c2bf5 commit 60f90e6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- 3.x
- kobenguyent-patch-1
# Build and push Docker images *only* for releases.
release:
types: [published] # , created, edited
Expand All @@ -15,6 +16,14 @@ jobs:
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Genenrate tags
run: |
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
TAGS='["codeceptjs/codeceptjs:latest","codeceptjs/codeceptjs:'${GITHUB_REF/refs\/tags\//}'"]'
else
TAGS='["codeceptjs/codeceptjs:latest"]'
fi
echo '::set-output name=tags::'$TAGS
- name: Push to Docker Hub
uses: docker/build-push-action@v1 # Info: https://github.com/docker/build-push-action/tree/releases/v1#tags
Expand All @@ -24,4 +33,4 @@ jobs:
repository: ${{ secrets.DOCKERHUB_REPOSITORY }}
tag_with_ref: true # Info: https://github.com/docker/build-push-action/tree/releases/v1#tag_with_ref
tag_with_sha: true # Info: https://github.com/docker/build-push-action/tree/releases/v1#tag_with_sha
tags: latest
tags: $TAGS

0 comments on commit 60f90e6

Please sign in to comment.