Skip to content

Commit 445d7ba

Browse files
Fix bug in docker run scorecard version (#1991)
Co-authored-by: Azeem Shaikh <azeems@google.com>
1 parent 2fb4093 commit 445d7ba

File tree

1 file changed

+7
-20
lines changed

1 file changed

+7
-20
lines changed

cloudbuild/scorecard-tag.yaml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,13 @@
1515
steps:
1616
- id: Get Git history
1717
name: gcr.io/cloud-builders/git
18-
args:
19-
- fetch
20-
- '--unshallow'
21-
- '--tags'
22-
- origin
23-
- $COMMIT_SHA
18+
args: ['fetch', '--unshallow', '--tags', 'origin', '$COMMIT_SHA']
2419
- id: Get tag commit
2520
name: gcr.io/cloud-builders/git
26-
entrypoint: bash
27-
args:
28-
- '-c'
29-
- >-
30-
git rev-list -n 1 tags/$TAG_NAME > /workspace/commit-sha.txt
31-
- id: Push docker tag
32-
name: gcr.io/cloud-builders/docker
33-
entrypoint: bash
34-
args:
35-
- '-c'
36-
- >-
37-
docker pull gcr.io/openssf/scorecard:$(cat /workspace/commit-sha.txt) &&
38-
docker tag gcr.io/openssf/scorecard:$(cat /workspace/commit-sha.txt) gcr.io/openssf/scorecard:$TAG_NAME &&
39-
docker push gcr.io/openssf/scorecard:$TAG_NAME
21+
args: ['checkout', '$TAG_NAME']
22+
- name: gcr.io/cloud-builders/docker
23+
args: [ 'build', '.',
24+
'-t', 'gcr.io/openssf/scorecard:$COMMIT_SHA',
25+
'-t', 'gcr.io/openssf/scorecard:$TAG_NAME',
26+
'-f', 'Dockerfile']
4027
images: ['gcr.io/openssf/scorecard']

0 commit comments

Comments
 (0)