Skip to content

Commit e43c04f

Browse files
authored
Merge pull request #789 from dev-hato/fix_deploy_ci
リリース起点でlatestと該当バージョンのDockerタグを打つ
2 parents 83f434f + 73166b6 commit e43c04f

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/pr-docker-hato-bot.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
name: deploy
33

44
on:
5-
push:
6-
branches:
7-
- master
5+
release:
6+
types:
7+
- published
88
pull_request:
99

1010
jobs:
@@ -38,8 +38,10 @@ jobs:
3838
env:
3939
HEAD_REF: ${{github.head_ref}}
4040
if: ${{ github.event_name == 'pull_request' }}
41-
- run: echo 'TAG_NAME=latest' >> "$GITHUB_ENV"
42-
if: ${{ github.event_name == 'push' }}
41+
- run: |
42+
echo 'TAG_NAME=v${{ github.event.release.tag_name }}' >> "$GITHUB_ENV"
43+
echo 'TAG_NAME=latest' >> "$GITHUB_ENV"
44+
if: ${{ github.event_name == 'relase' }}
4345
- name: Build docker image
4446
run: docker-compose build --build-arg BUILDKIT_INLINE_CACHE=1
4547
- name: Start docker

0 commit comments

Comments
 (0)