Skip to content

Commit 9bc01e6

Browse files
Update README.md
1 parent 43bde24 commit 9bc01e6

File tree

1 file changed

+24
-13
lines changed

1 file changed

+24
-13
lines changed

README.md

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,14 @@ Here's the full GitHub Actions workflow used for automated builds and releases:
115115
name: Build ISO
116116

117117
on:
118-
push:
119-
branches: [ "main" ]
120-
pull_request:
121-
branches: [ "main" ]
118+
workflow_dispatch:
122119
schedule:
123-
# Runs every day at midnight
124-
- cron: '0 0 * * *'
120+
# Run the workflow every day at midnight
121+
- cron: 0 0 * * *
125122

126123
jobs:
127124
build:
128-
runs-on: ubuntu-latest
125+
runs-on: ubuntu-latest # Use a standard runner
129126

130127
steps:
131128
- name: Checkout Repository
@@ -147,30 +144,44 @@ jobs:
147144
- name: Rename ISO to Arch.iso
148145
run: |
149146
docker exec arch-container bash -c "
147+
# Find the created ISO (assuming only one .iso file in the output directory)
150148
iso_file=\$(ls /workdir/out/*.iso | head -n 1) &&
151149
mv \$iso_file /workdir/out/Arch.iso
152150
"
153151
152+
- name: List ISO files
153+
run: |
154+
# List files in the output directory to verify renaming
155+
docker exec arch-container bash -c "ls -l /workdir/out/"
156+
154157
- name: Copy ISO to Host
155158
run: |
159+
# Copy the renamed ISO to the host
156160
docker cp arch-container:/workdir/out/Arch.iso ${{ github.workspace }}/
157-
161+
162+
- name: Get current date
163+
id: date
164+
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
165+
166+
# Create a release on GitHub using Personal Access Token (PAT)
158167
- name: Create GitHub Release
168+
id: create_release # Adding an ID to reference the release step
159169
uses: actions/[email protected]
160170
env:
161-
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
171+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
162172
with:
163-
tag_name: v${{ steps.date.outputs.date }}-release
164-
release_name: ${{ steps.date.outputs.date }}
173+
tag_name: v${{ github.run_id }}-release
174+
release_name: "Arch Linux Release"
165175
body: |
166176
This release contains the Arch Linux ISO built on ${{ steps.date.outputs.date }}.
167177
draft: false
168178
prerelease: false
169179

180+
# Upload the ISO to the GitHub release with a specific, predictable name
170181
- name: Upload ISO to GitHub Release
171182
uses: actions/upload-release-asset@v1
172183
env:
173-
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
184+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
174185
with:
175186
upload_url: ${{ steps.create_release.outputs.upload_url }}
176187
asset_path: ${{ github.workspace }}/Arch.iso
@@ -180,7 +191,7 @@ jobs:
180191
- name: Clean Up
181192
run: |
182193
docker stop arch-container
183-
docker rm arch-container**
194+
docker rm arch-container
184195
```
185196
186197
---

0 commit comments

Comments
 (0)