ci(docker): use version instead of commit sha

This commit is contained in:
Amruth Pillai 2022-03-09 19:30:30 +01:00
parent 781dc4d231
commit 612335696c
No known key found for this signature in database
GPG Key ID: E3C57DF9B80855AD
1 changed files with 16 additions and 16 deletions

View File

@ -13,9 +13,9 @@ jobs:
- name: Checkout the repository
uses: actions/checkout@v3.0.0
- id: slug
name: Get Short Commit SHA
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
- id: version
name: Get Version
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Login to Docker
uses: docker/login-action@v1.14.1
@ -31,7 +31,7 @@ jobs:
file: client/Dockerfile
tags: |
amruthpillai/reactive-resume:client-latest
amruthpillai/reactive-resume:client-${{ steps.slug.outputs.sha8 }}
amruthpillai/reactive-resume:client-${{ steps.version.outputs.tag }}
docker_server:
name: Docker (Server)
@ -41,9 +41,9 @@ jobs:
- name: Checkout the repository
uses: actions/checkout@v3.0.0
- id: slug
name: Get Short Commit SHA
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
- id: version
name: Get Version
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Login to Docker
uses: docker/login-action@v1.14.1
@ -59,7 +59,7 @@ jobs:
file: server/Dockerfile
tags: |
amruthpillai/reactive-resume:server-latest
amruthpillai/reactive-resume:server-${{ steps.slug.outputs.sha8 }}
amruthpillai/reactive-resume:server-${{ steps.version.outputs.tag }}
github_client:
name: GitHub (Client)
@ -69,9 +69,9 @@ jobs:
- name: Checkout the repository
uses: actions/checkout@v3.0.0
- id: slug
name: Get Short Commit SHA
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
- id: version
name: Get Version
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1.14.1
@ -88,7 +88,7 @@ jobs:
file: client/Dockerfile
tags: |
ghcr.io/amruthpillai/reactive-resume:client-latest
ghcr.io/amruthpillai/reactive-resume:client-${{ steps.slug.outputs.sha8 }}
ghcr.io/amruthpillai/reactive-resume:client-${{ steps.version.outputs.tag }}
github_server:
name: GitHub (Server)
@ -98,9 +98,9 @@ jobs:
- name: Checkout the repository
uses: actions/checkout@v3.0.0
- id: slug
name: Get Short Commit SHA
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
- id: version
name: Get Version
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1.14.1
@ -117,4 +117,4 @@ jobs:
file: server/Dockerfile
tags: |
ghcr.io/amruthpillai/reactive-resume:server-latest
ghcr.io/amruthpillai/reactive-resume:server-${{ steps.slug.outputs.sha8 }}
ghcr.io/amruthpillai/reactive-resume:server-${{ steps.version.outputs.tag }}