iso_build #49
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: | |
# schedule: | |
# - cron: '30 2 * * *' | |
jobs: | |
prepare-release: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
uses: styfle/cancel-workflow-action@0.9.0 | |
with: | |
access_token: ${{ github.token }} | |
- | |
id: time | |
uses: nanzm/get-time-action@v1.1 | |
with: | |
format: 'DDMMYYYYHHmm' | |
outputs: | |
release_tag: ${{ steps.time.outputs.time }} | |
build-release: | |
runs-on: ubuntu-latest | |
needs: [prepare-release] | |
steps: | |
- name: Allow workflow to be cancelled | |
uses: styfle/cancel-workflow-action@0.9.0 | |
with: | |
access_token: ${{ github.token }} | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@master | |
with: | |
root-reserve-mb: 512 | |
swap-size-mb: 1024 | |
remove-dotnet: 'true' | |
remove-android: 'true' | |
remove-haskell: 'true' | |
remove-codeql: 'true' | |
- name: Run Docker builder | |
uses: pl-strflt/docker-container-action@v1 | |
with: | |
repository: evangelospro/dotfiles | |
ref: main | |
opts: --network=host --privileged | |
dockerfile: iso/Dockerfile | |
args: -v "isoOUT":/home/builder/build/iso/isoOUT | |
- name: Upload Releases | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: | | |
*.part* | |
*.sha256 | |
- name: Rollback | |
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 }} |