Skip to content

Commit 9b053ce

Browse files
revert
1 parent d77156e commit 9b053ce

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/fake-release.yaml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,47 +8,51 @@ on:
88
required: true
99
description: 'Version number (for example: 0.1.0)'
1010
push:
11-
branches:
12-
- test-odh-notebooks-sync
11+
branches: [ main ]
1312

1413
env:
1514
BRANCH_NAME: main
1615
PR_BRANCH_NAME: snyk-tag-monitoring-${{ github.run_id }}
17-
GITHUB_TOKEN: ${{ secrets.GH_CLI_TOKEN }}
1816
RELEASE_VERSION: ${{ github.event.inputs.release-version || '0.2.0' }}
1917

2018
jobs:
2119
release:
2220
runs-on: ubuntu-latest
21+
permissions:
22+
contents: write
23+
pull-requests: write
2324
steps:
2425
- name: Checkout code
2526
uses: actions/checkout@v4
2627
with:
2728
submodules: recursive
29+
token: ${{ secrets.GH_CLI_TOKEN }}
2830

2931
- name: Append tag to Snyk monitoring list
3032
run: |
31-
sed -i 's/list_of_released_tags=(/list_of_released_tags=("v$RELEASE_VERSION", /' .github/workflows/snyk-security.yaml
33+
sed -i 's/list_of_released_tags=(/list_of_released_tags=("v${{ env.RELEASE_VERSION }}", /' .github/workflows/snyk-security.yaml
3234
3335
- name: Commit and push changes
3436
run: |
3537
git config --global user.email "[email protected]"
3638
git config --global user.name "codeflare-machine-account"
3739
git checkout -b $PR_BRANCH_NAME
3840
git commit -am "Update snyk-security.yaml"
39-
git push origin $PR_BRANCH_NAME
41+
git push --set-upstream origin "$PR_BRANCH_NAME"
4042
4143
- name: Create Pull Request
4244
run: |
4345
gh pr create \
4446
--title "$pr_title" \
4547
--body "$pr_body" \
4648
--head ${{ env.PR_BRANCH_NAME }} \
47-
--base "$GIT_BRANCH"
49+
--base main \
50+
--label "lgtm"
51+
--label "approved"
4852
env:
49-
pr_title: "Append tag $RELEASE_VERSION to Snyk monitoring list"
53+
GITHUB_TOKEN: ${{ secrets.GH_CLI_TOKEN }}
54+
pr_title: "Append tag v${{ env.RELEASE_VERSION }} to Snyk monitoring list"
5055
pr_body: |
5156
:rocket: This is an automated Pull Request generated by [release.yaml](https://github.com/project-codeflare/codeflare-sdk/blob/main/.github/workflows/release.yaml) workflow.
5257
5358
This PR appends to the list of tags that Snyk will be monitoring.
54-
GIT_BRANCH: ${GITHUB_REF#refs/heads/}

0 commit comments

Comments
 (0)