Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions .github/chainguard/self.bump.sts.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
issuer: https://token.actions.githubusercontent.com

subject_pattern: repo:DataDog/build-plugins:ref:refs/heads/master
subject_pattern: repo:DataDog/build-plugins:ref:refs/heads/(master|v2)

claim_pattern:
event_name: workflow_dispatch
ref: refs/heads/master
ref: refs/heads/(master|v2)
ref_protected: "true"
job_workflow_ref: DataDog/build-plugins/.github/workflows/bump.yaml@.*
job_workflow_ref: DataDog/build-plugins/\.github/workflows/bump\.yaml@refs/heads/(master|v2)

permissions:
contents: write # Required to create tags and push the bump commit
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/bump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,15 @@ jobs:
TAG_NAME="v$VERSION"
echo "Tag name: $TAG_NAME"

CURRENT_BRANCH_NAME="${{ github.head_ref || github.ref_name }}"
echo "Current branch name: $CURRENT_BRANCH_NAME"

BRANCH_NAME="bump-version-$TAG_NAME"
echo "Branch name: $BRANCH_NAME"


# Outputs for the next steps.
echo "current_branch_name=$CURRENT_BRANCH_NAME" >> $GITHUB_OUTPUT
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
echo "version=$VERSION" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -109,7 +113,7 @@ jobs:
PR_URL=$(gh pr create \
--title "$TITLE" \
--body "This PR bumps the package versions to \`${{ steps.vars.outputs.tag_name }}\`" \
--base master \
--base "${{ steps.vars.outputs.current_branch_name }}" \
--head "${{ steps.vars.outputs.branch_name }}")
OUTPUT="### PR Created\n**[$TITLE]($PR_URL)**"
echo -e "$OUTPUT" >> $GITHUB_STEP_SUMMARY
Expand Down