-
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.
- Loading branch information
Showing
9 changed files
with
261 additions
and
0 deletions.
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,7 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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,5 @@ | ||
# inherits settings from https://github.com/Manjaro-Sway/.github/blob/main/.github/settings.yml | ||
_extends: .github | ||
repository: | ||
homepage: https://aur.archlinux.org/flashfocus-git.git | ||
# you can extend settings using https://probot.github.io/apps/settings/ |
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,20 @@ | ||
name: bootstrap | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 1-23/2 * * *' | ||
|
||
jobs: | ||
botstrap_actions: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.BOOTSTRAP_WORKFLOWS }} | ||
- | ||
id: bootstrap | ||
uses: Manjaro-Sway/bootstrap-package-actions@master | ||
with: | ||
upstream: "https://aur.archlinux.org/flashfocus-git.git" |
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,19 @@ | ||
name: "forward-all-contributors" | ||
on: | ||
issue_comment: | ||
types: [created] | ||
pull_request_review_comment: | ||
types: [created] | ||
|
||
jobs: | ||
add-contributors: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: create comment in target repo | ||
uses: peter-evans/create-or-update-comment@v2 | ||
if: contains(github.event.comment.body, '@all-contributors') | ||
with: | ||
issue-number: 73 | ||
repository: manjaro-sway/manjaro-sway | ||
body: ${{ github.event.comment.body }} | ||
token: ${{ secrets.PUSH_AND_TRIGGER }} |
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,38 @@ | ||
name: increment pkgrel | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
pkgrel: | ||
description: 'pkgrel to set - will iterate if not given' | ||
required: false | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
increment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: checkout | ||
uses: actions/[email protected] | ||
with: | ||
token: ${{ secrets.PUSH_AND_TRIGGER }} | ||
- | ||
name: increment_rel | ||
run: | | ||
CURRENT_VERSION=$(cat PKGBUILD | grep pkgrel | sed -e 's/^pkgrel=//') | ||
INPUT_VERSION=${{ github.event.inputs.pkgrel }} | ||
NEXT_VERSION=$((CURRENT_VERSION + 1)) | ||
sed -i "/pkgrel=/c\pkgrel=${INPUT_VERSION:-${NEXT_VERSION}}" PKGBUILD | ||
git config user.name increment-version-action | ||
git config user.email [email protected] | ||
- | ||
name: commit | ||
run: | | ||
git add PKGBUILD | ||
git commit -m "release: increment rel" | ||
git push |
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,43 @@ | ||
name: pkgbuild | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
force-update: | ||
description: 'update artifacts' | ||
required: false | ||
default: 'false' | ||
push: | ||
branches: | ||
- master | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pkgbuild: | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 15 | ||
strategy: | ||
matrix: | ||
archlinux_arch: [aarch64, x86_64] | ||
include: | ||
- archlinux_arch: aarch64 | ||
docker_arch: aarch64 | ||
- archlinux_arch: x86_64 | ||
docker_arch: amd64 | ||
name: pkgbuild for ${{ matrix.archlinux_arch }} | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: pkgbuild | ||
id: pkgbuild | ||
uses: Manjaro-Sway/manjaro-package-action@main | ||
with: | ||
docker_arch: ${{ matrix.docker_arch }} | ||
archlinux_arch: ${{ matrix.archlinux_arch }} | ||
gpg_keyid: ${{ secrets.GPG_KEYID }} | ||
gpg_signing_key_base64: ${{ secrets.GPG_SECRET_KEY_BASE64 }} | ||
dispatch-token: ${{ secrets.DISPATCH }} | ||
force-update: ${{ github.event.inputs.force-update }} |
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,46 @@ | ||
name: rebase | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '*/30 * * * *' | ||
|
||
env: | ||
UPSTREAM_GIT: https://aur.archlinux.org/flashfocus-git.git | ||
|
||
jobs: | ||
rebase: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: checkout | ||
uses: actions/[email protected] | ||
with: | ||
token: ${{ secrets.PUSH_AND_TRIGGER }} | ||
fetch-depth: 0 | ||
- | ||
name: add ssh pk | ||
if: ${{ contains(env.UPSTREAM_GIT, 'ssh') }} | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "${{ secrets.SSH_BASE64 }}" | base64 -d >~/.ssh/id_rsa && chmod 400 ~/.ssh/id_rsa | ||
[ -f .github/additional_known_hosts ] && cat .github/additional_known_hosts >> ~/.ssh/known_hosts | ||
- | ||
name: check if behind upstream | ||
run: | | ||
git remote add upstream ${UPSTREAM_GIT} | ||
git fetch upstream | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Manjaro Sway" | ||
git rebase upstream/$(git branch --show-current) && git push --force-with-lease | ||
- name: telegram | ||
if: failure() | ||
uses: appleboy/telegram-action@master | ||
with: | ||
to: ${{ secrets.TELEGRAM_TO }} | ||
token: ${{ secrets.TELEGRAM_TOKEN }} | ||
disable_web_page_preview: true | ||
message: | | ||
Failed to rebase ${{ github.repository }} onto ${{ env.UPSTREAM_GIT }} | ||
Check pipeline: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} |
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,47 @@ | ||
name: resubmit the release | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '20 1-23/2 * * *' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
resubmit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: determine skip | ||
run: | | ||
if [[ "$GITHUB_EVENT_NAME" == "workflow_dispatch" || $(( RANDOM % 6 )) == 0 ]]; | ||
then | ||
echo "SKIP=false" >> $GITHUB_ENV | ||
fi | ||
- | ||
id: version | ||
if: ${{ env.SKIP == 'false' }} | ||
run: | | ||
LATEST_INFO=$(curl --silent "https://api.github.com/repos/${{ github.repository }}/releases/latest") | ||
echo "::set-output name=file-name-aarch64::$(echo $LATEST_INFO | jq -r '.assets[].name' | grep aarch64)" | ||
echo "::set-output name=file-name-x86_64::$(echo $LATEST_INFO | jq -r '.assets[].name' | grep -E -i -w '(x86_64|any)')" | ||
echo "VERSION=$(echo $LATEST_INFO | jq -r '.tag_name')" >> $GITHUB_ENV | ||
- | ||
name: dispatch_aarch64 | ||
if: ${{ env.SKIP == 'false' && steps.version.outputs.file-name-aarch64 != '' }} | ||
uses: peter-evans/repository-dispatch@v2 | ||
with: | ||
token: ${{ secrets.DISPATCH }} | ||
repository: manjaro-sway/packages | ||
event-type: package_update | ||
client-payload: '{ "repository": "${{ github.repository }}", "version": "${{ env.VERSION }}", "file_name": "${{ steps.version.outputs.file-name-aarch64 }}"}' | ||
- | ||
name: dispatch_x86_64 | ||
if: ${{ env.SKIP == 'false' && steps.version.outputs.file-name-x86_64 != '' }} | ||
uses: peter-evans/repository-dispatch@v2 | ||
with: | ||
token: ${{ secrets.DISPATCH }} | ||
repository: manjaro-sway/packages | ||
event-type: package_update | ||
client-payload: '{ "repository": "${{ github.repository }}", "version": "${{ env.VERSION }}", "file_name": "${{ steps.version.outputs.file-name-x86_64 }}"}' |
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,36 @@ | ||
name: set version to src version | ||
|
||
on: | ||
repository_dispatch: | ||
types: [source_update] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
update-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: check out the repo | ||
id: checkout_repo | ||
uses: actions/[email protected] | ||
with: | ||
token: ${{ secrets.PUSH_AND_TRIGGER }} | ||
- | ||
name: update pkgbuild | ||
env: | ||
VERSION: ${{ github.event.client_payload.version }} | ||
MD5: ${{ github.event.client_payload.md5 }} | ||
run: | | ||
[ -n "$VERSION" ] && sed -i "/pkgver=/c\pkgver=${VERSION}" PKGBUILD || exit 0 | ||
[ -n "$MD5" ] && sed -i "/_sourcemd5=/c\_sourcemd5=${MD5}" PKGBUILD || exit 0 | ||
- | ||
name: commit | ||
run: | | ||
git config --global user.name "Repo Update Bot" | ||
git config --global user.email "[email protected]" | ||
git add PKGBUILD | ||
git commit -m "chore: release version ${{ github.event.client_payload.version }}" | ||
git push |