mirror of
https://codeberg.org/spire/nochat.git
synced 2026-11-30 10:10:47 +01:00
flake reorg
This commit is contained in:
parent
7c161d4eef
commit
bbc940cdfe
3 changed files with 69 additions and 82 deletions
40
.github/workflows/compile.yml
vendored
40
.github/workflows/compile.yml
vendored
|
|
@ -3,25 +3,39 @@ name: Build sourcepawn and commit
|
|||
on:
|
||||
push:
|
||||
paths:
|
||||
- '**.sp'
|
||||
- "**.sp"
|
||||
- ".forgejo/workflows/**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: nix
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Compile sourcepawn
|
||||
uses: spiretf/spcomp@v0.1
|
||||
- uses: actions/checkout@v6
|
||||
- uses: https://codeberg.org/icewind/attic-action@v1
|
||||
with:
|
||||
source: './plugin/nochat.sp'
|
||||
target: './plugin/nochat.smx'
|
||||
name: link
|
||||
instance: https://cache.icewind.link
|
||||
authToken: "${{ secrets.ATTIC_TOKEN }}"
|
||||
|
||||
- name: Build
|
||||
run: nix build && cp -L result/* ./plugin/
|
||||
|
||||
- id: check_file_outdated
|
||||
name: Check if compiled smx needs committing
|
||||
run: |
|
||||
git status --porcelain
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "compiled output has changed"
|
||||
echo "outdated=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "compiled output has unchanged"
|
||||
echo "outdated=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Commit files
|
||||
if: steps.check_file_outdated.outputs.outdated == 'true'
|
||||
run: |
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
git config --global user.email ""
|
||||
git config --global user.name "Compile from CI"
|
||||
git commit -m "Compile sourcepawn" -a
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
git push
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue