2024-04-03 22:16:25 +02:00
|
|
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
2024-05-22 20:36:19 +02:00
|
|
|
name: Update void-packages template
|
2024-04-03 22:16:25 +02:00
|
|
|
|
2024-04-06 14:51:32 +02:00
|
|
|
on:
|
|
|
|
push:
|
2024-05-22 20:36:19 +02:00
|
|
|
tags: ["*"]
|
2024-04-03 22:16:25 +02:00
|
|
|
|
|
|
|
jobs:
|
2024-05-22 20:36:19 +02:00
|
|
|
update-template:
|
|
|
|
name: Update xbps-src template
|
|
|
|
runs-on: ubuntu-latest
|
2024-04-03 22:16:25 +02:00
|
|
|
steps:
|
2024-05-22 21:02:30 +02:00
|
|
|
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
|
2024-04-03 22:16:25 +02:00
|
|
|
with:
|
2024-05-22 20:36:19 +02:00
|
|
|
fetch-depth: 0
|
|
|
|
token: ${{ secrets.FORGEJO_PUSH_TOKEN }}
|
|
|
|
repository: "snailed/void-packages"
|
|
|
|
sparse-checkout: "srcpkgs/st-custom/"
|
|
|
|
ref: "master"
|
2024-04-03 22:16:25 +02:00
|
|
|
|
2024-05-22 20:36:19 +02:00
|
|
|
- name: Modify template
|
|
|
|
id: checksum
|
2024-04-03 22:16:25 +02:00
|
|
|
run: |
|
2024-05-22 20:36:19 +02:00
|
|
|
sed -i '/version=/ c version=${{ github.ref_name }}' srcpkgs/st-custom/template
|
2024-04-03 22:16:25 +02:00
|
|
|
|
2024-05-22 20:36:19 +02:00
|
|
|
wget https://git.snaile.de/snailed/st-custom/archive/${{ github.ref_name }}.tar.gz
|
|
|
|
sha256sum="$(sha256sum ${{ github.ref_name }}.tar.gz | cut -d ' ' -f 1)"
|
|
|
|
sed -i "/checksum=/ c checksum=${sha256sum}" srcpkgs/st-custom/template
|
2024-05-23 14:11:12 +02:00
|
|
|
sed -i "/revision=/ c revision=1" srcpkgs/st-custom/template
|
2024-04-03 22:16:25 +02:00
|
|
|
|
2024-05-22 20:36:19 +02:00
|
|
|
- name: Commit
|
|
|
|
uses: https://github.com/stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # v4.16.0
|
|
|
|
with:
|
|
|
|
commit_user_name: "Johnny5"
|
|
|
|
commit_user_email: "bot@snaile.de"
|
|
|
|
commit_author: "Johnny5 <bot@snaile.de>"
|
|
|
|
commit_message: "st-custom: update to ${{ github.ref_name }}."
|