ci: test if it can be compressed into a single workflow
This commit is contained in:
parent
8c2b3576c5
commit
7c6bd3ee05
2 changed files with 46 additions and 9 deletions
28
.forgejo/actions/update_branch/action.yml
Normal file
28
.forgejo/actions/update_branch/action.yml
Normal file
|
@ -0,0 +1,28 @@
|
|||
name: 'Update_Geyser'
|
||||
description: 'Updates Geyser for a specified branch'
|
||||
inputs:
|
||||
branch: # id of input
|
||||
description: 'what branch to update'
|
||||
required: true
|
||||
default: 'main'
|
||||
token: # id of input
|
||||
description: 'Token needed to commit changes'
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
permissions:
|
||||
# Give the default GITHUB_TOKEN write permission to commit and push the
|
||||
# added or changed files to the repository.
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.branch }}
|
||||
token: ${{ inputs.token }}
|
||||
- run: nix run .#update_plugin -- update geyser
|
||||
shell: bash
|
||||
- uses: https://github.com/stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "Updated geyser for ${{ inputs.branch }}"
|
||||
- run: git checkout main
|
||||
shell: bash
|
|
@ -18,9 +18,9 @@ jobs:
|
|||
# shell: bash
|
||||
|
||||
update:
|
||||
strategy:
|
||||
matrix:
|
||||
branch: [ main, skynet, anime_manga ]
|
||||
# strategy:
|
||||
# matrix:
|
||||
# branch: [ main, skynet, anime_manga ]
|
||||
runs-on: nix
|
||||
permissions:
|
||||
# Give the default GITHUB_TOKEN write permission to commit and push the
|
||||
|
@ -30,10 +30,19 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ matrix.branch }}
|
||||
token: ${{ secrets.PIPELINE_TOKEN }}
|
||||
- run: nix run .#update_plugin -- update geyser
|
||||
shell: bash
|
||||
- uses: https://github.com/stefanzweifel/git-auto-commit-action@v5
|
||||
fetch-depth: 0
|
||||
- name: "main"
|
||||
uses: ./.forgejo/actions/update_branch
|
||||
with:
|
||||
commit_message: "Updated geyser for ${{ matrix.branch }}"
|
||||
branch: "main"
|
||||
token: ${{ secrets.PIPELINE_TOKEN }}
|
||||
- name: "skynet"
|
||||
uses: ./.forgejo/actions/update_branch
|
||||
with:
|
||||
branch: "skynet"
|
||||
token: ${{ secrets.PIPELINE_TOKEN }}
|
||||
- name: "anime_manga"
|
||||
uses: ./.forgejo/actions/update_branch
|
||||
with:
|
||||
branch: "anime_manga"
|
||||
token: ${{ secrets.PIPELINE_TOKEN }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue