Skip to content

fcos

fcos #1215

Workflow file for this run

name: fcos
on:
schedule:
- cron: '0 20 * * *'
jobs:
checkAndPR:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Pull fedora-coreos-streams
run: |
old_hash=$(sha256sum vars.json)
cd fedora-coreos-streams
git fetch origin
git reset --hard origin/main
jq '.architectures.x86_64.artifacts.metal.formats as $formats |
($formats["iso"].disk | {
iso_url: .location,
iso_checksum: .sha256,
ignition_url: "https://raw.githubusercontent.com/iquiw/packer-fedora-coreos/master/ignition.cfg",
}) + {
raw_url: $formats["raw.xz"].disk.location
}' streams/stable.json > ../vars.json
cd ..
new_hash=$(sha256sum vars.json)
if [ "$old_hash" = "$new_hash" ]; then
# no update, reset submodule change
git submodule update
fi
- name: Set release version
id: fcos-version
run: |
version=$(jq -r '.architectures.x86_64.artifacts.metal.release' fedora-coreos-streams/streams/stable.json)
echo "::set-output name=version::$version"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: 'Update Fedora CoreOS version to ${{ steps.fcos-version.outputs.version }}'
branch: 'create-pull-request/fcos-${{ steps.fcos-version.outputs.version }}'
delete-branch: true
title: 'Update Fedora CoreOS version to ${{ steps.fcos-version.outputs.version }}'
body: |
Sync from [coreos/fedora-coreos-streams][1].
Auto-generated by [create-pull-request][2]
[1]: https://github.com/coreos/fedora-coreos-streams
[2]: https://github.com/peter-evans/create-pull-request
labels: |
upstream
automated pr
assignees: iquiw