-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(actions-bootstrap): update default actions
- Loading branch information
bootstrap-package-actions
committed
May 12, 2024
1 parent
e1f3129
commit 44653b4
Showing
3 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: increment-pkgrel | ||
|
||
on: | ||
repository_dispatch: | ||
types: | ||
- increment-pkgrel | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
increment-pkgrel: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@main | ||
- id: increment-pkgrel | ||
run: | | ||
CURRENT_PKGREL=$(cat PKGBUILD | grep -oP 'pkgrel=\K[0-9]+') | ||
INCREMENTED_PKGREL=$((CURRENT_PKGREL + 1)) | ||
sed -i "s/pkgrel=$CURRENT_PKGREL/pkgrel=$INCREMENTED_PKGREL/" PKGBUILD | ||
- name: commit | ||
run: | | ||
if [ -n "$(git status --porcelain)" ]; then | ||
git config user.name "Manjaro Bot" | ||
git config user.email "info@jonas-strassel.de" | ||
git add PKGBUILD | ||
git commit -m "chore(actions-increment-pkgrel): increment pkgrel" | ||
git push | ||
fi | ||
- name: dispatch | ||
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3 | ||
with: | ||
token: ${{ secrets.DISPATCH_TOKEN || github.token }} | ||
repository: ${{ github.repository }} | ||
event-type: pkgrel-incremented |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
repository_dispatch: | ||
types: | ||
- rebase | ||
- pkgrel-incremented | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters