Skip to content

Commit

Permalink
Merge pull request #20 from javanlacerda/javan.test
Browse files Browse the repository at this point in the history
Javan.test
  • Loading branch information
javanlacerda authored Sep 23, 2024
2 parents 8251f90 + 23cf5b8 commit 0ce5cac
Showing 1 changed file with 8 additions and 9 deletions.
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

0 comments on commit 0ce5cac

Please sign in to comment.