Skip to content

Commit

Permalink
comment all cosign user/pass
Browse files Browse the repository at this point in the history
  • Loading branch information
momentmaker committed Aug 16, 2024
1 parent e9bf1c9 commit 241348b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/actions/goreleaser-build-sign-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ runs:
- name: Run goreleaser release
shell: bash
env:
ENABLE_COSIGN: ${{ inputs.enable-cosign }}
# ENABLE_COSIGN: ${{ inputs.enable-cosign }}
ENABLE_GORELEASER_SNAPSHOT: ${{ inputs.enable-goreleaser-snapshot }}
ENABLE_GORELEASER_SPLIT: ${{ inputs.enable-goreleaser-split }}
ENABLE_DOCKER_PUBLISH: ${{ inputs.enable-docker-publish }}
Expand All @@ -124,9 +124,9 @@ runs:
GORELEASER_CONFIG: ${{ inputs.goreleaser-config }}
GORELEASER_KEY: ${{ inputs.goreleaser-key }}
GITHUB_TOKEN: ${{ github.token }}
COSIGN_PASSWORD: ${{ inputs.cosign-password }}
COSIGN_PUBLIC_KEY: ${{ inputs.cosign-public-key }}
COSIGN_PRIVATE_KEY: ${{ inputs.cosign-private-key }}
# COSIGN_PASSWORD: ${{ inputs.cosign-password }}
# COSIGN_PUBLIC_KEY: ${{ inputs.cosign-public-key }}
# COSIGN_PRIVATE_KEY: ${{ inputs.cosign-private-key }}
MACOS_SDK_DIR: ${{ inputs.macos-sdk-dir }}
run: |
# https://github.com/orgs/community/discussions/24950
Expand Down
20 changes: 10 additions & 10 deletions .github/actions/goreleaser-build-sign-publish/action_utils
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
set -x
set -euo pipefail

ENABLE_COSIGN=${ENABLE_COSIGN:-false}
# ENABLE_COSIGN=${ENABLE_COSIGN:-false}
ENABLE_GORELEASER_SNAPSHOT=${ENABLE_GORELEASER_SNAPSHOT:-false}
ENABLE_GORELEASER_SPLIT=${ENABLE_GORELEASER_SPLIT:-false}
ENABLE_DOCKER_PUBLISH=${ENABLE_DOCKER_PUBLISH:-false}
COSIGN_PASSWORD=${COSIGN_PASSWORD:-""}
# COSIGN_PASSWORD=${COSIGN_PASSWORD:-""}
GORELEASER_EXEC=${GORELEASER_EXEC:-goreleaser}
GORELEASER_CONFIG=${GORELEASER_CONFIG:-.goreleaser.yaml}
IMAGE_PREFIX=${IMAGE_PREFIX:-"localhost:5001"}
Expand Down Expand Up @@ -69,10 +69,10 @@ goreleaser_release() {
flags=$(printf "%s " "${goreleaser_flags[@]}")
flags=$(echo "$flags" | sed 's/ *$//')

if [[ $ENABLE_COSIGN == "true" ]]; then
echo "$COSIGN_PUBLIC_KEY" > cosign.pub
echo "$COSIGN_PRIVATE_KEY" > cosign.key
fi
# if [[ $ENABLE_COSIGN == "true" ]]; then
# echo "$COSIGN_PUBLIC_KEY" > cosign.pub
# echo "$COSIGN_PRIVATE_KEY" > cosign.key
# fi

if [[ -n $MACOS_SDK_DIR ]]; then
MACOS_SDK_DIR=$(echo "$(cd "$(dirname "$MACOS_SDK_DIR")" || exit; pwd)/$(basename "$MACOS_SDK_DIR")")
Expand All @@ -85,10 +85,10 @@ goreleaser_release() {
_publish_snapshot_manifests
fi

if [[ $ENABLE_COSIGN == "true" ]]; then
rm -rf cosign.pub
rm -rf cosign.key
fi
# if [[ $ENABLE_COSIGN == "true" ]]; then
# rm -rf cosign.pub
# rm -rf cosign.key
# fi
}

"$@"

0 comments on commit 241348b

Please sign in to comment.