Skip to content

Commit

Permalink
pr body
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyEnr1quez committed Sep 8, 2024
1 parent c4d6e8e commit ce9d746
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/karios-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,30 @@ jobs:
- uses: DeterminateSystems/magic-nix-cache-action@main

- uses: workflow/nix-shell-action@v3
id: update
with:
packages: regctl
script: |
kairos_version=$(regctl tag ls quay.io/kairos/opensuse \
kairos_image_tag=$(regctl tag ls quay.io/kairos/opensuse \
--include 'leap-\d+.\d+-standard-amd64-generic.*' \
--exclude '.*(master|alpha|beta|rc).*' \
| tail -1)
echo $kairos_version
replacement_pattern='s|version: "[^"]*"|version: "'"$kairos_version"'"|g'
replacement_pattern='s|version: "[^"]*"|version: "'"$kairos_image_tag"'"|g'
sed -i "$replacement_pattern" ./system-upgrade/system-upgrade-controller/plans/amd.yaml
# outputs
leap_version="$(cut -d'-' -f2 <<< $kairos_image_tag)"
echo "opensuse_url=https://doc.opensuse.org/release-notes/x86_64/openSUSE/Leap/$leap_version/" >> $GITHUB_OUTPUT
kairos_version="$(cut -d'-' -f6 <<< $kairos_image_tag)"
echo "kairos_url=https://github.com/kairos-io/kairos/releases/tag/$kairos_version" >> $GITHUB_OUTPUT
k3s_version="$(cut -d'-' -f7 <<< $kairos_image_tag)"
k3s_version=${k3s_version:3}
echo "k3s_url=https://github.com/k3s-io/k3s/releases/tag/$k3s_version+k3s1" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
Expand All @@ -47,3 +57,16 @@ jobs:
draft: false
branch: chore/update-kairos
delete-branch: true
body: |
Update kairos version
- [openSUSE][os]
- [Kairos][kairos]
- [k3s][k3s]
Auto-generated by [create-pull-request][cpr]
[cpr]: https://github.com/peter-evans/create-pull-request
[os]: ${{ steps.update.outputs.opensuse_url }}
[kairos]: ${{ steps.update.outputs.kairos_url }}
[k3s]: ${{ steps.update.outputs.k3s_url }}

0 comments on commit ce9d746

Please sign in to comment.