Skip to content

Commit

Permalink
Use yq to modify the codeflare-notebook-imagestream.yaml for release
Browse files Browse the repository at this point in the history
  • Loading branch information
sutaakar authored and openshift-merge-robot committed Sep 12, 2023
1 parent f614195 commit df7a020
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/tag-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ jobs:
with:
go-version: v1.19

- name: Install yq
run: |
sudo wget -O /usr/bin/yq https://github.com/mikefarah/yq/releases/download/v4.6.1/yq_linux_amd64
sudo chmod +x /usr/bin/yq
- name: Verify that release doesn't exist yet
shell: bash {0}
run: |
Expand Down Expand Up @@ -71,9 +76,12 @@ jobs:

- name: Adjust CodeFlare notebook ImageStream
run: |
sed -i -E "s|(.*name: ).*|\1${{ github.event.inputs.codeflare-sdk-version }}|" codeflare-notebook-imagestream.yaml
sed -i -E "s|(.*name: quay.io/project-codeflare/notebook:).*|\1${{ github.event.inputs.codeflare-sdk-version }}|" codeflare-notebook-imagestream.yaml
yq eval '.spec.tags[0].name = strenv(CODEFLARE_SDK_VERSION)' -i codeflare-notebook-imagestream.yaml
yq eval '.spec.tags[0].from.name = strenv(CODEFLARE_SDK_NOTEBOOK_IMAGE)' -i codeflare-notebook-imagestream.yaml
working-directory: codeflare-stack/base
env:
CODEFLARE_SDK_VERSION: ${{ github.event.inputs.codeflare-sdk-version }}
CODEFLARE_SDK_NOTEBOOK_IMAGE: "quay.io/project-codeflare/notebook:${{ github.event.inputs.codeflare-sdk-version }}"

- name: Commit changes in the code back to repository
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down

0 comments on commit df7a020

Please sign in to comment.