x86 Builds #292
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
name: x86 Builds | |
on: | |
schedule: | |
- cron: '30 17 * * *' | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- .github/workflows/iso_build.yaml | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
env: | |
MATRIX_ROOM_ID: "!XXstZzLEcUVKyTcqCA:matrix.org" | |
MIRROR: https://opencolo.mm.fcix.net/manjaro | |
jobs: | |
prepare-release: | |
runs-on: ubuntu-22.04 | |
steps: | |
- id: time | |
uses: boredland/get-time-action@dbc808befb89eb33fee64f5f4abce4d2a5fa7cfd # tag=2.0.0 | |
with: | |
format: 'YYYYMMDDHHmm' | |
- id: kernel | |
uses: boredland/kernel-info@main | |
outputs: | |
release_tag: rc-${{ steps.time.outputs.time }} | |
longterm: ${{ steps.kernel.outputs.longterm-pkg }} | |
stable: ${{ steps.kernel.outputs.stable-pkg }} | |
build-stable: | |
runs-on: ubuntu-22.04 | |
needs: [prepare-release] | |
name: stable x86_64 ${{ matrix.edition }} | |
permissions: | |
contents: write | |
actions: read | |
strategy: | |
fail-fast: false | |
matrix: | |
edition: | |
- kde | |
- xfce | |
- gnome | |
- i3 | |
- cinnamon | |
- sway | |
include: | |
- repo: https://gitlab.manjaro.org/profiles-and-settings/iso-profiles.git | |
- edition: kde | |
mention: "@lordtermor:matrix.org" | |
- edition: xfce | |
mention: "@daphilly:matrix.org" | |
- edition: gnome | |
mention: "@yochananmarqos:matrix.org" | |
- edition: i3 | |
mention: "@oberon-manjaro:matrix.org" | |
- edition: cinnamon | |
mention: "@oberon-manjaro:matrix.org" | |
- edition: sway | |
mention: "@boredland:matrix.org" | |
repo: https://github.com/manjaro-sway/iso-profiles | |
steps: | |
- name: x86_64 build | |
uses: manjaro-contrib/action-buildiso@main | |
with: | |
iso-profiles-repo: ${{ matrix.repo }} | |
edition: ${{ matrix.edition }} | |
branch: stable | |
scope: full | |
kernel: ${{ needs.prepare-release.outputs.longterm }} | |
release-tag: ${{ needs.prepare-release.outputs.release_tag }} | |
build-mirror: ${{ env.MIRROR }} | |
gpg-secret-key-base64: ${{ secrets.GPG_KEY_BASE64 }} | |
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
- uses: Tiryoh/[email protected] | |
id: url | |
if: failure() | |
with: | |
github_token: ${{ github.token }} | |
job_name: 'stable x86_64 ${{ matrix.edition }}' | |
- uses: s3krit/[email protected] | |
if: failure() | |
with: | |
room_id: ${{ env.MATRIX_ROOM_ID}} | |
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }} | |
message: "🚨 Error building **${{ matrix.edition }}** for **x86** (**stable**). Summon ${{ matrix.mention }} to check the [logs](${{ steps.url.outputs.html_url }}) 🪄" | |
server: "matrix.org" | |
build-next: | |
runs-on: ubuntu-22.04 | |
needs: [prepare-release] | |
name: ${{ matrix.branch }} x86_64 ${{ matrix.edition }} | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
branch: [unstable] | |
edition: | |
- kde-dev | |
- xfce | |
- gnome-next | |
- i3 | |
- cinnamon | |
- sway | |
include: | |
- repo: https://gitlab.manjaro.org/profiles-and-settings/iso-profiles.git | |
- edition: sway | |
repo: https://github.com/manjaro-sway/iso-profiles | |
steps: | |
- name: x86_64 build | |
uses: manjaro-contrib/action-buildiso@main | |
with: | |
iso-profiles-repo: ${{ matrix.repo }} | |
edition: ${{ matrix.edition }} | |
branch: ${{ matrix.branch }} | |
scope: full | |
kernel: ${{ needs.prepare-release.outputs.stable }} | |
release-tag: ${{ needs.prepare-release.outputs.release_tag }} | |
build-mirror: ${{ env.MIRROR}} | |
gpg-secret-key-base64: ${{ secrets.GPG_KEY_BASE64 }} | |
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
announce: | |
runs-on: ubuntu-22.04 | |
needs: [prepare-release, build-stable] | |
if: needs.build-stable.result == 'success' | |
steps: | |
- uses: s3krit/[email protected] | |
with: | |
room_id: ${{ env.MATRIX_ROOM_ID}} | |
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }} | |
message: "🚀 Success building for **x86** (stable): Should we do a release? Check out [those](https://github.com/${{ github.repository }}/releases/tag/${{ needs.prepare-release.outputs.release_tag }}) assets!" | |
server: "matrix.org" | |
rollback: | |
runs-on: ubuntu-22.04 | |
needs: [prepare-release, build-stable, build-next] | |
if: cancelled() || failure() | |
steps: | |
- uses: actions/checkout@v4 | |
- name: rollback | |
run: | | |
echo ${{ github.token }} | gh auth login --with-token | |
ASSET_COUNT=$(gh release view ${{ needs.prepare-release.outputs.release_tag }} --json "assets" --jq '.assets | length') | |
# If we have more than the two tarballs github creates, we can delete the release - there is nothing to inspect | |
if [ "$ASSET_COUNT" -gt "2" ]; then exit 0;fi | |
gh release delete ${{ needs.prepare-release.outputs.release_tag }} -y --repo ${{ github.repository }} | |
git push --delete origin ${{ needs.prepare-release.outputs.release_tag }} | |
- uses: s3krit/[email protected] | |
if: ${{ needs.build-stable.result == 'failure' }} | |
with: | |
room_id: ${{ env.MATRIX_ROOM_ID}} | |
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }} | |
message: "😬 Error building for **x86**: Please have a look into the [logs](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" | |
server: "matrix.org" |