Skip to content

Commit b284769

Browse files
author
Gonzalo Diaz
committed
[CONFIG] [Gihub Actions] Docker image name as variable.
1 parent d679b69 commit b284769

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/docker-image.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on: # yamllint disable-line rule:truthy
88
pull_request:
99
branches: ["main"]
1010

11+
env:
12+
IMAGE_NAME: algorithm-exercises-ts
13+
1114
jobs:
1215

1316
build:
@@ -28,8 +31,8 @@ jobs:
2831
- name: Tag Docker image
2932
run: >
3033
docker tag
31-
algorithm-exercises-js:latest
32-
algorithm-exercises-js:${{ github.sha }}
34+
${{ env.IMAGE_NAME }}:latest
35+
${{ env.IMAGE_NAME }}:${{ github.sha }}
3336
3437
- name: Run Snyk to check Docker image for vulnerabilities
3538
# Snyk can be used to break the build when it detects vulnerabilities.
@@ -44,7 +47,7 @@ jobs:
4447
# yamllint enable rule:line-length
4548
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
4649
with:
47-
image: algorithm-exercises-js:latest
50+
image: ${{ env.IMAGE_NAME }}:${{ github.sha }}
4851
args: --file=Dockerfile
4952
# yamllint disable rule:comments-indentation
5053
# - name: Upload result to GitHub Code Scanning

0 commit comments

Comments
 (0)