Skip to content

next

next #9

Workflow file for this run

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
PR_BRANCH_NAME: snyk-tag-monitoring-${{ github.run_id }}
GITHUB_TOKEN: ${{ secrets.GH_CLI_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: Commit and push changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "codeflare-machine-account"
git checkout -b $PR_BRANCH_NAME
git commit -am "Update snyk-security.yaml"
git push origin $PR_BRANCH_NAME
- name: Create Pull Request
run: |
gh pr create \
--title "$pr_title" \
--body "$pr_body" \
--head ${{ env.PR_BRANCH_NAME }} \
--base "$GIT_BRANCH"
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.
GIT_BRANCH: ${GITHUB_REF#refs/heads/}