Skip to content

Commit f37c6b1

Browse files
authored
fix sed and update job (#470)
Signed-off-by: cpanato <[email protected]>
1 parent d640505 commit f37c6b1

File tree

4 files changed

+5
-26
lines changed

4 files changed

+5
-26
lines changed

.github/workflows/cut-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ jobs:
5252

5353
- name: Start cloudbuild job
5454
working-directory: ./src/github.com/sigstore/fulcio
55-
run: gcloud builds submit --no-source --config release/cloudbuild.yaml --substitutions _GIT_TAG=${{ env.GIT_TAG }},_TOOL_ORG=sigstore,_TOOL_REPO=fulcio,_STORAGE_LOCATION=fulcio-releases,_KEY_RING=${{ github.event.inputs.key_ring }},_KEY_NAME=${{ github.event.inputs.key_name }},_GITHUB_USER=${{ github.actor }} --project=${{ env.PROJECT_ID }}
55+
run: gcloud builds submit --no-source --config release/cloudbuild.yaml --substitutions _GIT_TAG=${{ env.GIT_TAG }},_TOOL_ORG=sigstore,_TOOL_REPO=fulcio,_STORAGE_LOCATION=fulcio-releases,_KEY_RING=${{ github.event.inputs.key_ring }},_KEY_NAME=${{ github.event.inputs.key_name }},_GITHUB_USER=sigstore-bot --project=${{ env.PROJECT_ID }}

.goreleaser.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ env:
1010
before:
1111
hooks:
1212
- go mod tidy
13+
- /bin/bash -c 'if [ -n "$(git --no-pager diff --exit-code go.mod go.sum)" ]; then exit 1; fi'
1314
# if running a release we will generate the images in this step
1415
# if running in the CI the CI env va is set by github action runner and we dont run the ko steps
1516
# this is needed because we are generating files that goreleaser was not aware to push to GH project release

release/cloudbuild.yaml

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -55,38 +55,16 @@ steps:
5555
- GIT_TAG=${_GIT_TAG}
5656
- GOOGLE_SERVICE_ACCOUNT_NAME=keyless@${PROJECT_ID}.iam.gserviceaccount.com
5757
- COSIGN_EXPERIMENTAL=true
58-
secretEnv:
59-
- GITHUB_TOKEN
60-
args:
61-
- '-c'
62-
- |
63-
make release
64-
65-
- name: ghcr.io/gythialy/golang-cross:v1.17.8-0@sha256:b5b14c6a61099af5a69864f242766a0dca978d2aea97e311d051ee4f4b7d19ba
66-
entrypoint: 'bash'
67-
dir: "go/src/sigstore/fulcio"
68-
env:
69-
- "GOPATH=/workspace/go"
70-
- "GOBIN=/workspace/bin"
71-
- PROJECT_ID=${PROJECT_ID}
72-
- KEY_LOCATION=${_KEY_LOCATION}
73-
- KEY_RING=${_KEY_RING}
74-
- KEY_NAME=${_KEY_NAME}
75-
- KEY_VERSION=${_KEY_VERSION}
76-
- GIT_TAG=${_GIT_TAG}
7758
- KO_PREFIX=gcr.io/${PROJECT_ID}
78-
- COSIGN_EXPERIMENTAL=true
79-
- GOOGLE_SERVICE_ACCOUNT_NAME=keyless@${PROJECT_ID}.iam.gserviceaccount.com
8059
secretEnv:
8160
- GITHUB_TOKEN
8261
args:
8362
- '-c'
8463
- |
8564
gcloud auth configure-docker \
86-
&& make sign-container-release \
87-
&& make sign-keyless-release
65+
&& make release
8866
89-
- name: gcr.io/cloud-builders/docker
67+
- name: ghcr.io/gythialy/golang-cross:v1.17.8-0@sha256:b5b14c6a61099af5a69864f242766a0dca978d2aea97e311d051ee4f4b7d19ba
9068
entrypoint: 'bash'
9169
dir: "go/src/sigstore/fulcio"
9270
env:

release/release.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ push-manifest:
6767

6868
.PHONY: update-yaml
6969
update-yaml:
70-
sed -i -e 's/$(KO_PREFIX)\/fulcio@.*/$(KO_PREFIX)\/fulcio:$(GIT_VERSION)/g' $(FULCIO_YAML)
70+
sed -i -e 's/$(subst /,\/,$(KO_PREFIX))\/fulcio@.*/$(subst /,\/,$(KO_PREFIX))\/fulcio:$(GIT_VERSION)/g' $(FULCIO_YAML)
7171

7272
.PHONY: release-images
7373
release-images: ko-release push-manifest update-yaml

0 commit comments

Comments
 (0)