77 branches : [ "main" ]
88 workflow_dispatch :
99 schedule :
10- - cron : ' 0 0 1 * *' # Monthly run
10+ # Run the workflow on the 1st of every month at midnight
11+ - cron : ' 0 0 1 * *'
1112
1213jobs :
1314 build :
14- runs-on : ubuntu-latest
15+ runs-on : ubuntu-latest # Use a standard runner
1516
1617 steps :
1718 - name : Checkout Repository
@@ -33,38 +34,48 @@ jobs:
3334 - name : Rename ISO to Arch
3435 run : |
3536 docker exec arch-container bash -c "
37+ # Find the created ISO (assuming only one .iso file in the output directory)
3638 iso_file=\$(ls /workdir/out/*.iso | head -n 1) &&
3739 mv \$iso_file /workdir/out/Arch.iso
3840 "
3941
4042 - name : List ISO files
41- run : docker exec arch-container bash -c "ls -l /workdir/out/"
43+ run : |
44+ # List files in the output directory to verify renaming
45+ docker exec arch-container bash -c "ls -l /workdir/out/"
4246
4347 - name : Copy ISO to Host
44- run : docker cp arch-container:/workdir/out/Arch.iso ${{ github.workspace }}/
48+ run : |
49+ # Copy the renamed ISO to the host
50+ docker cp arch-container:/workdir/out/Arch.iso ${{ github.workspace }}/
4551
4652 - name : Get current date
4753 id : date
4854 run : echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
4955
56+ # Create a release on GitHub using Personal Access Token (PAT)
5057 - name : Create GitHub Release
51- id : create_release
52- uses : actions/create-release@v1 # Consider updating to v1 .1.0 or newer
58+ id : create_release # Store the release details for later steps
59+ 5360 env :
54- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
61+ GITHUB_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN }}
5562 with :
56- tag_name : " v${{ steps.date.outputs.date }}-release"
57- release_name : " Arch Linux ISO Release - ${{ steps.date.outputs.date }}"
58- body : " This release contains the Arch Linux ISO built on ${{ steps.date.outputs.date }}."
63+ tag_name : v${{ github.event.inputs.date || github.run_number }}-release
64+ release_name : Arch Linux ISO Release ${{ github.event.inputs.date || github.run_number }}
65+ body : |
66+ This release contains the Arch Linux ISO built on ${{ steps.date.outputs.date }}.
5967 draft : false
6068 prerelease : false
6169
70+ # Upload the ISO to the GitHub release
6271 - name : Upload ISO to GitHub Release
6372 uses : actions/upload-release-asset@v1
73+ env :
74+ GITHUB_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN }}
6475 with :
6576 upload_url : ${{ steps.create_release.outputs.upload_url }}
6677 asset_path : ${{ github.workspace }}/Arch.iso
67- asset_name : Arch-${{ steps. date.outputs.date }} .iso
78+ asset_name : Arch-$( date +'%Y-%m-%d') .iso
6879 asset_content_type : application/octet-stream
6980
7081 - name : Clean Up
0 commit comments