diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 867e23bbc6..4e716777e2 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -20,7 +20,7 @@ jobs: outputs: build_matrix: ${{ steps.generate_build_matrix.outputs.build_matrix }} container: - image: ghcr.io/terrapkg/builder:f38 + image: ghcr.io/terrapkg/builder:38 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:f38 + image: ghcr.io/terrapkg/builder:38 options: --cap-add=SYS_ADMIN --privileged steps: - name: Checkout @@ -50,6 +50,13 @@ jobs: with: fetch-depth: 0 + - uses: terrapkg/anda-build@main + if: github.event_name == 'pull_request' + with: + name: "${{ matrix.pkg.pkg }}" + mockConfig: anda-${{ matrix.version }}-${{ matrix.pkg.arch }} + andaRepo: https://github.com/terrapkg/subatomic-repos/raw/main/terra${{ matrix.version }}.repo + - uses: terrapkg/anda-build@main if: github.event_name != 'pull_request' with: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aa892da3b9..9b07de02eb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: fail-fast: false runs-on: ${{ matrix.arch == 'aarch64' && 'ARM64' || 'ubuntu-latest' }} container: - image: ghcr.io/terrapkg/builder:f38 + image: ghcr.io/terrapkg/builder:38 options: --cap-add=SYS_ADMIN --privileged steps: - name: Checkout @@ -36,9 +36,21 @@ jobs: - uses: terrapkg/anda-build@main with: name: "${{ matrix.pkg }}pkg" - mockConfig: anda-38-${{ 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/terra38.repo + andaRepo: https://github.com/terrapkg/subatomic-repos/raw/main/terra.repo + + - name: Generating artifact name + id: art + run: | + NAME=${{ matrix.pkg.pkg }}-${{ matrix.pkg.arch }}-${{ matrix.version }} + x=${NAME//\//@} + echo "name=$x" >> $GITHUB_OUTPUT + + - uses: actions/upload-artifact@v3 + with: + name: ${{ steps.art.outputs.name }} + path: anda-build/rpm/rpms/* - name: Upload packages to subatomic run: | @@ -49,7 +61,7 @@ jobs: - name: Notify Madoguchi (Success) if: success() - run: ./.github/workflows/mg.sh true ${{matrix.pkg.pkg}} ${{matrix.version}} ${{matrix.pkg.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} + run: ./.github/workflows/mg.sh true ${{matrix.pkg}} ${{matrix.version}} ${{matrix.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} - name: Notify Madoguchi (Failure) if: cancelled() || failure() - run: ./.github/workflows/mg.sh false ${{matrix.pkg.pkg}} ${{matrix.version}} ${{matrix.pkg.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} + run: ./.github/workflows/mg.sh false ${{matrix.pkg}} ${{matrix.version}} ${{matrix.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} diff --git a/.github/workflows/mg.sh b/.github/workflows/mg.sh index f25e7da65c..985f6959dc 100755 --- a/.github/workflows/mg.sh +++ b/.github/workflows/mg.sh @@ -3,6 +3,14 @@ set -x 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*: @@") diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index f92139e0be..8913585ddd 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -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 diff --git a/.github/workflows/update-comps.yml b/.github/workflows/update-comps.yml index 9301f64676..2c614f2aca 100644 --- a/.github/workflows/update-comps.yml +++ b/.github/workflows/update-comps.yml @@ -3,8 +3,9 @@ name: Push comps updates on: push: branches: - - main + - f39 - f38 + - f37 paths: - comps.xml workflow_dispatch: diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 2396c2d847..345d42fcfa 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -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