Skip to content

Commit

Permalink
adding read permission for PRs and adding full tag
Browse files Browse the repository at this point in the history
Signed-off-by: Javan lacerda <javanlacerda@google.com>
  • Loading branch information
javanlacerda committed Oct 8, 2024
1 parent 6939ae7 commit 878bd57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/container-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
permissions:
id-token: write
contents: read
pull-requests: read

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand Down Expand Up @@ -76,4 +77,4 @@ jobs:
- name: container
run: |
echo "Formated Label: ${{ steps.labels.outputs.FORMATED_LABELS }}"
KO_PREFIX=gcr.io/projectsigstore/fulcio/ci/fulcio FORMATED_LABEL=${{ steps.labels.outputs.FORMATED_LABELS }} make sign-keyless-ci
KO_PREFIX=gcr.io/projectsigstore/fulcio/ci/fulcio FORMATED_LABEL=${{ steps.labels.outputs.FORMATED_LABELS }} RUN_NUMBER=${{ github.run_number }} make sign-keyless-ci
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ GHCR_PREFIX ?= ghcr.io/sigstore
FULCIO_YAML ?= fulcio-$(GIT_TAG).yaml

# It should be blank for default builds
FORMATED_LABEL =
FORMATED_LABEL ?=

RUN_NUMBER ?= "local"

FULL_TAG := "0.$(shell date +%Y%m%d).$(RUN_NUMBER)+ref.$(GIT_HASH)"

# Binaries
PROTOC-GEN-GO := $(TOOLS_BIN_DIR)/protoc-gen-go
Expand Down Expand Up @@ -126,7 +130,7 @@ ko:
# fulcio
LDFLAGS="$(LDFLAGS)" GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_VERSION) \
KO_DOCKER_REPO=$(KO_PREFIX)/fulcio ko resolve $(FORMATED_LABEL) --bare \
--platform=linux/amd64 --tags $(GIT_VERSION) --tags $(GIT_HASH) \
--platform=linux/amd64 --tags $(GIT_VERSION) --tags $(GIT_HASH) --tags $(FULL_TAG) \
--image-refs fulcioImagerefs --filename config/ > $(FULCIO_YAML)

.PHONY: ko-local
Expand Down

0 comments on commit 878bd57

Please sign in to comment.