Designate scheduled action to execute once per year
All checks were successful
Generate Website / Generate Website (push) Successful in 16s

- Schedule action runner to run once per year at midnight on
  the first day of January
- Use `sha256sum` instead of `git` commit hashes for revision hash
- Set modification time of `website.tar.zst` to UNIX epoch
- Use GNU tar instead of busybox tar
This commit is contained in:
Xavier Moffett 2024-12-23 00:53:09 -05:00
parent 021c77f8a1
commit fb3c175e34
Signed by: Sapphirus
GPG key ID: A6C061B2CEA1A7AC

View file

@ -2,6 +2,8 @@ name: Generate Website
on: on:
workflow_dispatch: workflow_dispatch:
schedule:
- cron: '0 0 1 1 *'
push: push:
branches: branches:
- master - master
@ -11,18 +13,14 @@ env:
USER_NAME: ${{ vars.USER }} USER_NAME: ${{ vars.USER }}
jobs: jobs:
build: generate:
name: Generate Website name: Generate Website
runs-on: docker runs-on: docker
container: container:
image: alpine image: alpine
strategy:
matrix:
toolchain:
- stable
steps: steps:
- name: Install packages - name: Install packages
run: apk add --no-cache nodejs git git-lfs bash curl zstd run: apk add --no-cache nodejs git git-lfs bash curl tar zstd
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@ -67,8 +65,8 @@ jobs:
run: | run: |
echo "::group:: Packaging website" echo "::group:: Packaging website"
cd output cd output
tar acvf website.tar.zst * tar --mtime=1970-01-01 -acvf website.tar.zst *
echo "$(git rev-parse --short HEAD)$(git -C ../suo rev-parse --short HEAD)" > website.ver SUM=$(sha256sum website.tar.zst); echo "${SUM% *}" > website.ver
echo "::endgroup::" echo "::endgroup::"
- name: Upload package - name: Upload package
shell: bash shell: bash