-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53e1db0
commit e7ff06d
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Build Arch ISO | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
|
||
permissions: | ||
contents: write | ||
|
||
container: | ||
image: archlinux:latest | ||
options: --privileged | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set current date as environment variable | ||
run: echo "DATE=`date +'%Y.%m.%d'`" >>$GITHUB_ENV | ||
|
||
- name: Create temporary build directory | ||
run: mkdir -p /tmp/$DATE/airootfs/root/ | ||
|
||
- name: Add notes to .zprofile | ||
run: | | ||
echo ". /usr/share/makepkg/util/message.sh" >>/tmp/$DATE/airootfs/root/.zprofile | ||
echo -e "colorize\n" >>/tmp/$DATE/airootfs/root/.zprofile | ||
echo "msg \"This is an unofficial ISO created by GitHub Actions on $DATE from run ID $GITHUB_RUN_ID\"" >>/tmp/$DATE/airootfs/root/.zprofile | ||
echo "msg2 \"Check $GITHUB_SERVER_URL/$GITHUB_REPOSITORY#readme for more details\"" >>/tmp/$DATE/airootfs/root/.zprofile | ||
echo "echo \"\"" >>/tmp/$DATE/airootfs/root/.zprofile | ||
- name: Update packages and install archiso | ||
run: pacman -Syu --noconfirm archiso | ||
|
||
- name: Copy profile to build directory | ||
run: cp -r /usr/share/archiso/configs/releng/* /tmp/$DATE | ||
|
||
- name: Build ISO | ||
run: mkarchiso -v -w work/ -o ./ /tmp/$DATE | ||
|
||
- name: Generate release Markdown file | ||
run: | | ||
echo "\`MD5:\` \``md5sum archlinux-$DATE-x86_64.iso`\`" >>RELEASE.md | ||
echo "\`SHA1:\` \``sha1sum archlinux-$DATE-x86_64.iso`\`" >>RELEASE.md | ||
- name: Create tag and release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
name: Arch Linux ${{ env.DATE }} | ||
tag: ${{ env.DATE }} | ||
commit: main | ||
bodyFile: RELEASE.md | ||
artifacts: "archlinux-${{ env.DATE }}-x86_64.iso" | ||
token: ${{ secrets.GITHUB_TOKEN }} |