BuildStream Maintainance #318
This file contains hidden or 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
| name: BuildStream Maintainance | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: 12 0 * * * | |
| concurrency: | |
| # Purposefully put in the same group as push workflows to avoid race condition | |
| group: 'Push @ ${{ github.ref }}' | |
| jobs: | |
| refresh-caches: | |
| name: Refresh Caches | |
| uses: ./.github/workflows/build-project.yaml | |
| with: | |
| arches: '["x86_64", "aarch64"]' | |
| reupload-cache: true | |
| check-fsdk-update: | |
| name: Check for Freedesktop SDK update | |
| needs: refresh-caches | |
| runs-on: 'ubuntu-24.04' | |
| env: | |
| ELEMENT: freedesktop-sdk.bst | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Ensure Podman | |
| uses: ./.github/actions/ensure-podman | |
| - name: Setup BuildStream | |
| id: setup-buildstream | |
| uses: ./.github/actions/setup-buildstream | |
| - name: Source Track Element | |
| uses: ./.github/actions/source-track-bst-element | |
| with: | |
| shell: ${{ steps.setup-buildstream.outputs.shell }} | |
| element: ${{ env.ELEMENT }} | |
| - name: Check if the element has changed | |
| id: check | |
| shell: bash | |
| run: | | |
| : Check if the element has changed | |
| if [[ -z "$(git status --porcelain elements/${{ env.ELEMENT }})" ]]; then | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Sync shared files | |
| id: sync | |
| if: ${{ fromJSON(steps.check.outputs.changed) }} | |
| uses: ./.github/actions/sync-shared-fsdk-files | |
| with: | |
| fsdk-element: ${{ env.ELEMENT }} | |
| - name: Create pull request | |
| if: ${{ fromJSON(steps.check.outputs.changed) }} | |
| uses: peter-evans/create-pull-request@d121e62763d8cc35b5fb1710e887d6e69a52d3a4 | |
| with: | |
| author: 'Update Checker <[email protected]>' | |
| commit-message: 'Update Freedesktop SDK to version ${{ steps.sync.outputs.version }}' | |
| title: 'Update Freedesktop SDK' | |
| branch: 'automated/update-fsdk' | |
| delete-branch: true | |
| add-paths: elements/* |