next #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Fake Release | |
on: | |
workflow_dispatch: | |
inputs: | |
release-version: | |
type: string | |
required: true | |
description: 'Version number (for example: 0.1.0)' | |
push: | |
branches: | |
- test-odh-notebooks-sync | |
env: | |
BRANCH_NAME: main | |
UPDATER_BRANCH: snyk-tag-monitoring-${{ github.run_id }} | |
GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }} | |
RELEASE_VERSION: ${{ github.event.inputs.release-version || '0.2.0' }} | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Append tag to Snyk monitoring list | |
run: | | |
sed -i 's/list_of_released_tags=(/list_of_released_tags=("v$RELEASE_VERSION", /' .github/workflows/snyk-security.yaml | |
- name: Push changes | |
run: | | |
git add . && git status && git checkout -b ${{ env.UPDATER_BRANCH }} && \ | |
git commit -am "Updated notebooks via ${{ env.UPDATER_BRANCH }} GitHub action" && \ | |
git push origin ${{ env.UPDATER_BRANCH }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }} | |
- name: Create Pull Request | |
run: | | |
gh pr create --repo project-codeflare/codeflare-sdk \ | |
--title "$pr_title" \ | |
--body "$pr_body" \ | |
--head $UPDATER_BRANCH \ | |
--base $BRANCH_NAME | |
env: | |
pr_title: "Append tag $RELEASE_VERSION to Snyk monitoring list" | |
pr_body: | | |
: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. | |
This PR appends to the list of tags that Snyk will be monitoring. |