Skip to content

Merge pull request #103 from notional-labs/dependabot/github_actions/… #105

Merge pull request #103 from notional-labs/dependabot/github_actions/…

Merge pull request #103 from notional-labs/dependabot/github_actions/… #105

Workflow file for this run

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
env:
iso-profiles-git: https://github.com/notional-labs/iso-profiles.git
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:
EDITION: [notional]
BRANCH: [unstable]
SCOPE: [minimal]
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:
iso-profiles-repo: ${{ env.iso-profiles-git }}
edition: ${{ matrix.edition }}
branch: ${{ matrix.branch }}
scope: ${{ matrix.scope }}
# 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 }}