This repository has been archived by the owner on Feb 6, 2023. It is now read-only.
-
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
0 parents
commit 466222d
Showing
10 changed files
with
332 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://git.hya.sk/skia/swaysome.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@v2 | ||
with: | ||
token: ${{ secrets.BOOTSTRAP_WORKFLOWS }} | ||
- | ||
id: bootstrap | ||
uses: Manjaro-Sway/bootstrap-package-actions@master | ||
with: | ||
upstream: "https://git.hya.sk/skia/swaysome.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,23 @@ | ||
name: "forward-all-contributors" | ||
on: | ||
issue_comment: | ||
types: [created] | ||
pull_request_review_comment: | ||
types: [created] | ||
|
||
jobs: | ||
add-contributors: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: check user has write access | ||
uses: lannonbr/[email protected] | ||
with: | ||
permission: "write" | ||
- name: create comment in target repo | ||
uses: peter-evans/create-or-update-comment@v1 | ||
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,34 @@ | ||
name: increment pkgrel | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
pkgrel: | ||
description: 'pkgrel to set - will iterate if not given' | ||
required: false | ||
|
||
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,107 @@ | ||
name: pkgbuild | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
|
||
jobs: | ||
prepare: | ||
runs-on: ubuntu-20.04 | ||
name: prepare | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: check-updatable | ||
id: check | ||
run: | | ||
VERSION=$(cat PKGBUILD | grep pkgver= | sed -e 's/^pkgver=//' | awk '{print $1}')-$(cat PKGBUILD | grep pkgrel= | sed -e 's/^pkgrel=//' | awk '{print $1}') | ||
echo "ARCHITECTURES=$(cat PKGBUILD | grep arch= | sed -e 's/^arch=(\(.*\))/\1/')" >>$GITHUB_ENV | ||
echo "VERSION=${VERSION}" >>$GITHUB_ENV | ||
git fetch --tags | ||
git rev-list "${VERSION}" >/dev/null && \ | ||
echo "::set-output name=updatable::false" || \ | ||
echo "::set-output name=updatable::true" | ||
outputs: | ||
updatable: ${{ steps.check.outputs.updatable }} | ||
architectures: ${{ env.ARCHITECTURES }} | ||
version: ${{ env.VERSION }} | ||
pkgbuild: | ||
runs-on: ubuntu-20.04 | ||
name: ${{ matrix.distro }} ${{ matrix.arch }} | ||
needs: [prepare] | ||
if: ${{ needs.prepare.outputs.updatable == 'true' }} | ||
strategy: | ||
matrix: | ||
include: | ||
- arch: aarch64 | ||
distro: manjaro_latest | ||
archlinux_arch: aarch64 | ||
- arch: amd64 | ||
distro: manjaro_latest | ||
archlinux_arch: x86_64 | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: get-additional-gpg | ||
run: | | ||
echo ${{ secrets.GPG_KEYID }} >>.github/additional_gpg | ||
echo "ADDITIONAL_GPG=$(cat .github/additional_gpg)" >>$GITHUB_ENV | ||
- name: any-build | ||
if: ${{ ( contains(needs.prepare.outputs.architectures, 'any') && matrix.archlinux_arch == 'x86_64' ) }} | ||
run: echo "BUILD=true" >>$GITHUB_ENV | ||
- name: arch-build | ||
if: ${{ contains(needs.prepare.outputs.architectures, matrix.archlinux_arch) }} | ||
run: echo "BUILD=true" >>$GITHUB_ENV | ||
- uses: Manjaro-Sway/run-on-arch-action@master | ||
if: ${{ env.BUILD == 'true' }} | ||
name: build | ||
id: build | ||
with: | ||
arch: ${{ matrix.arch }} | ||
distro: ${{ matrix.distro }} | ||
githubToken: ${{ github.token }} | ||
setup: | | ||
mkdir -p "${PWD}/artifacts" | ||
dockerRunArgs: | | ||
--volume "${PWD}/artifacts:/artifacts" | ||
--cap-add=SYS_ADMIN | ||
shell: /bin/sh | ||
install: | | ||
for key in "${{ env.ADDITIONAL_GPG }}";do | ||
sudo -u builder gpg --keyserver keys.openpgp.org --recv-key $key | ||
done | ||
sudo -u builder gpg --keyserver keys.openpgp.org --recv-key ${{ secrets.GPG_KEYID }} | ||
pacman-key --keyserver keys.openpgp.org --recv-keys ${{ secrets.GPG_KEYID }} | ||
sed -i '/^\[core\]/i \[manjaro-sway\]\nSigLevel = Optional TrustAll\nServer = https://packages.manjaro-sway.download/$arch\n' /etc/pacman.conf | ||
pacman-mirrors --geoip | ||
run: | | ||
pacman -Syy | ||
chown builder $PWD | ||
sudo -u builder makepkg -fsAc --noconfirm --noprogressbar | ||
cp *.pkg.tar.zst* /artifacts/ | ||
- name: determine-filename | ||
if: ${{ env.BUILD == 'true' }} | ||
run: echo "FILE_NAME=$(basename $(find ./artifacts/ -type f \( -name "*.pkg.tar.zst" \)))" >> $GITHUB_ENV | ||
- name: sign | ||
if: ${{ env.BUILD == 'true' }} | ||
run: | | ||
# import signing key (no passphrase) | ||
cat <(echo -e "${{ secrets.GPG_SECRET_KEY_BASE64 }}" | base64 --decode) | gpg --batch --import | ||
gpg --pinentry-mode loopback --detach-sign ./artifacts/${{ env.FILE_NAME }} | ||
- name: release | ||
if: ${{ env.BUILD == 'true' }} | ||
run: | | ||
echo ${{ github.token }} | gh auth login --with-token | ||
gh release create ${{ needs.prepare.outputs.version }} --repo ${{ github.repository }} --notes "automated release" || echo "release already exists" | ||
gh release upload ${{ needs.prepare.outputs.version }} --repo ${{ github.repository }} --clobber \ | ||
./artifacts/${{ env.FILE_NAME }} ./artifacts/${{ env.FILE_NAME }}.sig | ||
- name: dispatch | ||
if: ${{ env.BUILD == 'true' }} | ||
uses: peter-evans/repository-dispatch@v1 | ||
with: | ||
token: ${{ secrets.DISPATCH }} | ||
repository: manjaro-sway/packages | ||
event-type: package_update | ||
client-payload: '{ "repository": "${{ github.repository }}", "version": "${{ needs.prepare.outputs.version }}", "file_name": "${{ env.FILE_NAME }}"}' |
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: rebase | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '*/30 * * * *' | ||
|
||
env: | ||
UPSTREAM_GIT: "" | ||
|
||
jobs: | ||
rebase: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: checkout | ||
uses: actions/[email protected] | ||
with: | ||
token: ${{ secrets.PUSH_AND_TRIGGER }} | ||
- | ||
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 merge-base --is-ancestor $(git branch --show-current) upstream/$(git branch --show-current) && exit 1 || exit 0 | ||
- | ||
name: rebase | ||
if: ${{ failure() }} | ||
run: | | ||
git rebase upstream/$(git branch --show-current) | ||
git push --force-with-lease |
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: resubmit the release | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '20 1-23/2 * * *' | ||
|
||
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@v1 | ||
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@v1 | ||
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,32 @@ | ||
name: set version to src version | ||
|
||
on: | ||
repository_dispatch: | ||
types: [source_update] | ||
|
||
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 |
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,23 @@ | ||
# Maintainer: Jonas Strasel <[email protected]> | ||
|
||
pkgname="swaysome" | ||
pkgver=1.0.64 | ||
pkgrel=0 | ||
pkgdesc="This binary helps you configure sway to work a bit more like Awesome. This currently means workspaces that are name-spaced on a per-screen basis." | ||
arch=("x86_64" "aarch64") | ||
url="https://git.hya.sk/skia/$pkgname" | ||
license=("none") | ||
makedepends=("rust" "cargo" "git") | ||
_commit="60fdf90d4d4ab075b4eb4121c09ea9ef855df109" | ||
source=("$pkgname-$pkgver.tar.gz::$url/archive/$_commit.tar.gz") | ||
sha256sums=('2538fe7783219a692fd7b9449f8482f53697988e4859e1962545bae9f353d904') | ||
|
||
build() { | ||
cd "$srcdir/$pkgname" | ||
cargo build --release --locked | ||
} | ||
|
||
package() { | ||
install -D -m755 "$srcdir/$pkgname/target/release/$pkgname" "$pkgdir/usr/bin/sworkstyle" | ||
# install -D -m644 "$srcdir/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | ||
} |