GitHub Actions 101 Continued
As RetroArch F-Droid repo hasn’t been updated long enough , I decide to give GitHub Actions a try (which turns into a doomed failure).
The basic idea is simple:
The official doc is super useful when writing the action.yml
.
And be sure to install a linter extension if you have a GUI in hand
(or you’ll go ape when dealing w/ the endless syntax error/startup failure).
And I refer to a CSDN blog when trying out Actions.
As I wish to download all three variants of RetroArch, I wanna do it in a single run
.
It’s simple: just use - run: |
and add the commands you want to use .
To commit the files, I followed this guide on CSDN .
To create tags & upload releases, I followed another guide on CSDN .
Oh, and I’m cursed by the Workers .gitignore
template for adding *.apk
,
which prevents the action from committing the files with the exact file extension XD.
I wish to use ISO date as tags. But git commit
does not accept pipeline like date --iso-8601 | git commit
.
Just use the -F <file>, --file=<file>
options.
Then you can redirect stdout
to git commit
.
date --iso-8601 | git commit -F -
Workflows are expected to get triggered on daily after buildbot finishes their job.
It uses a cron
syntax.
Besides that, on: push
is useful when debugging.
on:
push
After tens of fixes, the Action tells me that GitHub only allows files up to 100 MB so RetroArch*.apk
is outa reach, which is a signal for “NO”, unless you pay for $5/GB/m, for storage AND bandwidth, SEPERATELY.
Enable Git LFS would be enough, but I highly doubt the legitimacy to host a repo so I quit.
That’s why the project is doomed as was mentioned in the preface.
Anyway the journey is interesting, and I learned a lot.
If you are in want of a cool contributor, try the followings:
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
Don’t run on commits with [ci skip]
:
jobs:
build:
runs-on: ubuntu-latest
if: "! contains(github.event.head_commit.message, '[ci skip]')"
Only run on commits with [build]
:
jobs:
build:
runs-on: ubuntu-latest
if: "contains(toJSON(github.event.head_commit.message), '[build]')"
Source: skip ci for GitHub Actions
on:
push:
branches: ['main']
paths: ['folder/*']
Sine īrā et studiō