Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javan.test #20

Merged
merged 4 commits into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .github/workflows/container-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,21 @@ jobs:

- uses: ko-build/setup-ko@3aebd0597dc1e9d1a26bcfdb7cbeb19c131d3037 # v0.7


- name: Formatted label for breaking change
id: breaking_change
- name: Formatted labels
id: labels
run: |
FORMATED_LABELS="FORMATED_LABELS='--image-label commit-hash=$GITHUB_SHA'"

BRANCH_NUMBER=$(gh pr list --state all --search "sha:$GITHUB_SHA" | awk '{print $1}')
echo "Branch Number: $BRANCH_NUMBER"

# Check if a pull request number was found
if [ -n "$BRANCH_NUMBER" ]; then
FORMATED_LABEL="FORMATED_LABEL='--image-label breaking-change=true'"
else
FORMATED_LABEL="FORMATED_LABEL=" >> $GITHUB_OUTPUT
FORMATED_LABELS+=" --image-label breaking-change=true"
fi
echo $FORMATED_LABEL >> $GITHUB_OUTPUT
echo $FORMATED_LABELS >> $GITHUB_OUTPUT

- name: container
run: |
echo "Formated Label: ${{ steps.breaking_change.outputs.FORMATED_LABEL }}"
KO_PREFIX=gcr.io/projectsigstore/fulcio/ci/fulcio FORMATED_LABEL=${{ steps.breaking_change.outputs.FORMATED_LABEL }} make sign-keyless-ci
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
Loading