iso_build #48
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: iso_build | |
on: | |
workflow_dispatch: | |
# remove if you don't want to build on a schedule | |
schedule: | |
- cron: '30 6 1 * *' | |
# remove if you don't want to build when commits are pushed to you main/master branch | |
push: | |
branches: | |
- master | |
- main | |
jobs: | |
prepare-release: | |
runs-on: ubuntu-20.04 | |
steps: | |
# cancel already running instances of the same action on the currently working on branch | |
- uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- id: time | |
uses: nanzm/[email protected] | |
with: | |
format: 'YYYYMMDDHHmm' | |
outputs: | |
# generate a common tag to be used in all elements of the matrix strategy | |
release_tag: ${{ steps.time.outputs.time }} | |
release: | |
runs-on: ubuntu-20.04 | |
needs: prepare-release | |
strategy: | |
matrix: | |
##### EDIT ME ##### | |
EDITION: [mate] | |
BRANCH: [stable] | |
SCOPE: [full] | |
################### | |
steps: | |
# cancel already running instances of the same action on the currently working on branch | |
- uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- id: image-build | |
uses: manjaro/manjaro-iso-action@main | |
with: | |
edition: ${{ matrix.edition }} | |
branch: ${{ matrix.branch }} | |
scope: ${{ matrix.scope }} | |
version: "21.20" | |
kernel: linux515 | |
code-name: "Artemis" | |
iso-profiles-repo: "https://github.com/FreaxMATE/iso-profiles" | |
# providing a release-tag allows for github releases | |
release-tag: ${{ needs.prepare-release.outputs.release_tag }} | |
# delete the github release in case of cancellation or failure | |
# refer to .github/workflows/cleanup-test-release.yml for rollback strategies concerning the other distribution channels | |
- name: rollback github release | |
if: ${{ failure() || cancelled() }} | |
run: | | |
echo ${{ github.token }} | gh auth login --with-token | |
gh release delete ${{ needs.prepare-release.outputs.release_tag }} -y --repo ${{ github.repository }} | |
git push --delete origin ${{ needs.prepare-release.outputs.release_tag }} |