extract tag

This commit is contained in:
yedf2 2021-09-03 22:49:27 +08:00
parent 966da6e486
commit 455916823d

View File

@ -24,6 +24,9 @@ jobs:
env: env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Get the tag name
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Publish docker - name: Publish docker
env: env:
host: 'ubuntu@en.dtm.pub' host: 'ubuntu@en.dtm.pub'
@ -31,4 +34,4 @@ jobs:
run: | run: |
echo "${{secrets.DEPLOY_KEY}}" > deploy_key echo "${{secrets.DEPLOY_KEY}}" > deploy_key
chmod 600 ./deploy_key chmod 600 ./deploy_key
ssh -i deploy_key -o StrictHostKeyChecking=no ${{env.host}} 'cd ${{env.dest}}/dtm && git pull && sudo sh helper/build-repo.sh ${{github.event.release.tag_name}}' ssh -i deploy_key -o StrictHostKeyChecking=no ${{env.host}} 'cd ${{env.dest}}/dtm && git pull && sudo sh helper/build-repo.sh ${{env.TAG}}'