Skip to content

update username

update username #30

name: Format & stamp
on:
push:
branches:
- main
- staging
workflow_dispatch:
permissions:
contents: write
deployments: write
jobs:
format-and-stamp:
runs-on: blacksmith-4vcpu-ubuntu-2404
env:
PNPM_HOME: /home/runner/.local/share/pnpm
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Node.js & pnpm
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Install pnpm
run: |
corepack enable pnpm
mkdir -p "$PNPM_HOME"
echo "$PNPM_HOME" >> "$GITHUB_PATH"
- name: Cache pnpm global packages
uses: actions/cache@v4
with:
path: |
~/.local/share/pnpm/global
key: pnpm-global-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: pnpm-global-
- name: Install dependencies
run: pnpm add -g oxlint oxfmt esbuild html-minifier-terser
- name: Lint, format & version stamp
run: |
pnpm run fix || true
pnpm oxfmt --write . "**/*.{js,md,html,css,yml}"
echo "${{ github.sha }}" > game/images/Zombies/CX/v.html
- name: Commit changes
run: |
COMMIT_MSG=$(git log -1 --pretty=format:%s)
AUTHOR_EMAIL=$(git log -1 --pretty=format:%ae)
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Format \"$COMMIT_MSG\" [CF-Pages-Skip]
Original commit: https://github.com/${{ github.repository }}/commit/${{ github.sha }}
Co-authored-by: ${{ github.actor }} <$AUTHOR_EMAIL>" || exit 0
git push
mirror:
runs-on: blacksmith-2vcpu-ubuntu-2404
needs: format-and-stamp
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url: git@tangled.org:pvzm.net/game
ssh_private_key: ${{ secrets.TANGLED_SSH_PRIVATE_KEY }}