forked from Mellanox/network-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Network Operator release trigger
We need to start SR-IOV Network Operator release if Network Operator Release pipeline started. Signed-off-by: Ivan Kolodiazhnyi <[email protected]>
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
on: | ||
issues: | ||
types: | ||
- opened | ||
|
||
jobs: | ||
label_issue: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN_NVIDIA_CI_CD }} | ||
ISSUE_URL: ${{ github.event.issue.html_url }} | ||
ISSUE_TITLE: ${{ github.event.issue.title }} | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: | | ||
echo "ISSUE_TITLE" | ||
update_network_operator_values: | ||
runs-on: ubuntu-latest | ||
env: | ||
ISSUE_TITLE: ${{ github.event.issue.title }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GH_TOKEN_NVIDIA_CI_CD }} | ||
repository: ${{ github.repository_owner }}/sriov-network-operator | ||
- name: Save release name | ||
run: echo "RELEASE_NAME=$(echo $ISSUE_TITLE | awk '/Release v/{print $2}')" >> $GITHUB_ENV | ||
|
||
- name: Create PR to update image tags in network-operator values | ||
if: ${{ $release != '' }} | ||
run: | | ||
git config user.name nvidia-ci-cd | ||
git config user.email [email protected] | ||
git tag network-operator-$RELEASE_NAME | ||
git push origin --tags |