mirror of
https://github.com/mveril/qp-demo
synced 2025-03-14 21:06:29 +01:00
Compare commits
6 Commits
456545ecc1
...
fed70ff484
Author | SHA1 | Date | |
---|---|---|---|
fed70ff484 | |||
c499dfca52 | |||
c70ff10919 | |||
5a403665c3 | |||
562ac3226a | |||
fbaa052489 |
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -10,9 +10,6 @@ on:
|
|||||||
- master
|
- master
|
||||||
- release_*
|
- release_*
|
||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||||
jobs:
|
jobs:
|
||||||
# This workflow contains a single job called "build"
|
# This workflow contains a single job called "build"
|
||||||
@ -36,7 +33,6 @@ jobs:
|
|||||||
context: ./
|
context: ./
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
push: false
|
push: false
|
||||||
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/qp_demo:${GITHUB_REF#refs/heads/}.${GITHUB_SHA::8}
|
|
||||||
|
|
||||||
- name: Image digest
|
- name: Image digest
|
||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
run: echo ${{ steps.docker_build.outputs.digest }}
|
11
.github/workflows/deploy.yml
vendored
11
.github/workflows/deploy.yml
vendored
@ -25,16 +25,21 @@ jobs:
|
|||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
- uses: actions/checkout@v2
|
- 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
|
- name: Get Docker tag from branch name
|
||||||
id: extract_docker_tag
|
id: extract_docker_tag
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ "${GITHUB_REF#refs/heads/}" == "master" ]; then
|
if [ "${{ steps.extract_branch.outputs.branch }}" == "master" ]; then
|
||||||
echo "##[set-output name=tag;]$(echo 'latest')"
|
echo "##[set-output name=tag;]$(echo 'latest')"
|
||||||
elif [[ "${GITHUB_REF#refs/heads/}" == release_* ]]; then
|
elif [[ "${{ steps.extract_branch.outputs.branch }}" == release_* ]]; then
|
||||||
echo "##[set-output name=tag;]$(echo '${GITHUB_REF#refs/heads/}' | cut -d '_' -f2-)"
|
echo "##[set-output name=tag;]$(echo '${GITHUB_REF#refs/heads/}' | cut -d '_' -f2-)"
|
||||||
else
|
else
|
||||||
echo "##[set-output name=tag;]$(echo 'ghtest')"
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
|
Loading…
x
Reference in New Issue
Block a user