feat(ci): f37 workflows

This commit is contained in:
windowsboy111
2023-04-16 17:32:57 +08:00
parent d636086b85
commit 7c213381c1
6 changed files with 33 additions and 18 deletions
+4 -4
View File
@@ -6,10 +6,10 @@ on:
paths:
- anda/**
branches:
- main
- f37
pull_request:
branches:
- main
- f37
workflow_dispatch:
workflow_call:
@@ -20,7 +20,7 @@ jobs:
outputs:
build_matrix: ${{ steps.generate_build_matrix.outputs.build_matrix }}
container:
image: ghcr.io/terrapkg/builder:main
image: ghcr.io/terrapkg/builder:37
options: --cap-add=SYS_ADMIN --privileged
steps:
- name: Set workspace as safe
@@ -42,7 +42,7 @@ jobs:
fail-fast: false
runs-on: ${{ matrix.pkg.arch == 'aarch64' && 'ARM64' || 'ubuntu-latest' }}
container:
image: ghcr.io/terrapkg/builder:main
image: ghcr.io/terrapkg/builder:37
options: --cap-add=SYS_ADMIN --privileged
steps:
- name: Checkout
+2 -2
View File
@@ -25,7 +25,7 @@ jobs:
fail-fast: false
runs-on: ${{ matrix.arch == 'aarch64' && 'ARM64' || 'ubuntu-latest' }}
container:
image: ghcr.io/terrapkg/builder:main
image: ghcr.io/terrapkg/builder:37
options: --cap-add=SYS_ADMIN --privileged
steps:
- name: Checkout
@@ -36,7 +36,7 @@ jobs:
- uses: terrapkg/anda-build@main
with:
name: "${{ matrix.pkg }}pkg"
mockConfig: anda-37-${{ matrix.arch }}
mockConfig: anda-${{ matrix.version }}-${{ matrix.arch }}
extraArgs: -D "sccache_bucket ${{secrets.SCCACHE_BUCKET}}" -D "sccache_endpoint ${{secrets.SCCACHE_ENDPOINT}}" -D "sccache_secret ${{secrets.SCCACHE_SECRET}}" -D "sccache_accesskey ${{secrets.SCCACHE_ACCESSKEY}}"
andaRepo: https://github.com/terrapkg/subatomic-repos/raw/main/terra.repo
+7
View File
@@ -4,6 +4,13 @@ dirs=$2
dirs=${dirs/\/pkg/}
export p="{\"id\":\"$5\",\"ver\":\"%v\",\"rel\":\"%r\",\"arch\":\"$4\",\"dirs\":\"$dirs\",\"succ\":$1}"
if [[ $succ == false ]]; then
d=${p/\%v/?}
d=${d/\%r/?}
curl -H "Authorization: Bearer $6" https://madoguchi.fyralabs.com/ci/terra$3/builds/$n -X PUT -H "Content-Type: application/json" -d $d --fail-with-body
exit 0
fi
for f in anda-build/rpm/rpms/*; do
n=$(lesspipe.sh $f | grep -E "Name\s*: " | sed "s@Name\s*: @@")
v=$(lesspipe.sh $f | grep -E "Version\s*: " | sed "s@Version\s*: @@")
+9 -11
View File
@@ -4,10 +4,13 @@ on:
types:
- closed
branches:
- main
- f39
jobs:
sync:
strategy:
matrix:
branch: ["f37", "f38"]
if: github.event.pull_request.merged == true && !contains(github.event.pull_request.labels.*.name, 'nosync')
runs-on: ubuntu-latest
steps:
@@ -16,23 +19,18 @@ jobs:
with:
fetch-depth: 0
ssh-key: ${{ secrets.SSH_AUTHENTICATION_KEY }}
- name: Install SSH key
ref: ${{ matrix.branch }}
- name: Install SSH key and Setup Git
run: |
mkdir -p ${{ runner.temp }}
echo "${{ secrets.SSH_SIGNING_KEY }}" > ${{ runner.temp }}/signing_key
chmod 0700 ${{ runner.temp }}/signing_key
- name: Setup Git
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config user.name "Raboneko"
git config user.email "raboneko@fyralabs.com"
git config gpg.format "ssh"
git config user.signingkey "${{ runner.temp }}/signing_key"
- name: Download patches
run: curl https://github.com/terrapkg/packages/pull/${{ github.event.pull_request.number }}.patch > pr.patch
- name: Apply patches
- name: Apply patches and Push
run: |
git checkout f38
git am -S --keep-cr --signoff < pr.patch
- name: Push
run: git push -u origin --all
git am -S --keep-cr --signoff < curl https://github.com/terrapkg/packages/pull/${{ github.event.pull_request.number }}.patch
git push -u origin --all
+2 -1
View File
@@ -3,8 +3,9 @@ name: Push comps updates
on:
push:
branches:
- main
- f39
- f38
- f37
paths:
- comps.xml
workflow_dispatch:
+9
View File
@@ -39,5 +39,14 @@ jobs:
git config user.signingkey "${{ runner.temp }}/signing_key"
msg="bump: $(git status | grep modified | sed -r 's@.+/([^/]+)/[^/]+\n?@\1 @g' | tr -d '\n')"
git commit -S -a -m "$msg"
git format-patch HEAD^
git checkout f38
git apply *.patch || true
git add anda
git commit -S -a -m "$msg"
git checkout f37
git apply *.patch || true
git add anda
git commit -S -a -m "$msg"
git push -u origin --all
fi