mirror of
https://github.com/mveril/qp-demo
synced 2024-11-03 12:43:53 +01:00
Compare commits
4 Commits
36ed9f53fe
...
c499dfca52
Author | SHA1 | Date | |
---|---|---|---|
c499dfca52 | |||
c70ff10919 | |||
5a403665c3 | |||
562ac3226a |
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
@ -36,7 +36,6 @@ jobs:
|
||||
context: ./
|
||||
file: ./Dockerfile
|
||||
push: false
|
||||
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/qp_demo:${{ GITHUB_REF#refs/heads/ }}.${{ GITHUB_SHA::8 }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
13
.github/workflows/deploy.yml
vendored
13
.github/workflows/deploy.yml
vendored
@ -25,16 +25,21 @@ jobs:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Extract branch name
|
||||
shell: bash
|
||||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
||||
id: extract_branch
|
||||
|
||||
- name: Get Docker tag from branch name
|
||||
id: extract_docker_tag
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ GITHUB_REF#refs/heads/ }}" == "master" ]; then
|
||||
if [ "${{ steps.extract_branch.outputs.branch }}" == "master" ]; then
|
||||
echo "##[set-output name=tag;]$(echo 'latest')"
|
||||
elif [[ "${{ GITHUB_REF#refs/heads/ }}" == release_* ]]; then
|
||||
echo "##[set-output name=tag;]$(echo '${{ GITHUB_REF#refs/heads/ }}' | cut -d '_' -f2-)"
|
||||
elif [[ "${{ steps.extract_branch.outputs.branch }}" == release_* ]]; then
|
||||
echo "##[set-output name=tag;]$(echo '${GITHUB_REF#refs/heads/}' | cut -d '_' -f2-)"
|
||||
else
|
||||
echo "##[set-output name=tag;]$(echo 'ghtest')"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Login to Docker Hub
|
||||
|
Loading…
Reference in New Issue
Block a user