diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 73e53afa87..a80f49782f 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -83,3 +83,69 @@ jobs: - name: Notify Madoguchi (Failure) if: ( cancelled() || failure() ) && github.event_name == 'push' run: ./.github/workflows/mg.sh false ${{matrix.pkg.pkg}} ${{matrix.version}} ${{matrix.pkg.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} + + - name: Lint RPMs and SRPMs + id: lint + if: success() + run: | + rpmlint anda-build/ > rpmlint.txt || true + if [[ $? -ne 0 ]]; then + EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) + echo "lint_out<<$EOF" >> $GITHUB_ENV + cat rpmlint.txt >> $GITHUB_ENV + echo $EOF >> $GITHUB_ENV + fi + + - name: Try to install package + id: dnf + if: success() + run: | + x="" + for f in anda-build/rpm/rpms/*.rpm; do + dnf in --downloadonly $f > "$f.dnfout.txt" + if [[ $? -ne 0 ]]; then + x="$x### $f\n```\n$(cat $f.dnfout.txt)```\n" + fi + done + EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) + echo "dnf_out<<$EOF\n$x\n$EOF" >> $GITHUB_ENV + + - name: Comment RPMLint/DNF output (PR) + if: success() && github.event_name == 'pull_request' + uses: actions/github-script@v6 + with: + script: | + let out = ""; + if ("${{ env.lint_out }}".trim() != "") { + out += "## 🔨 Lint: [${{matrix.pkg.pkg}} (${{matrix.pkg.arch}})](https://github.com/terrapkg/packages/actions/runs/${{github.run_id}})\n"; + out += "```\n${{ env.lint_out }}```\n"; + } + if ("${{ env.dnf_out }}".trim() != "") { + out += "## ❌ DNF: [${{matrix.pkg.pkg}} (${{matrix.pkg.arch}})](https://github.com/terrapkg/packages/actions/runs/${{github.run_id}})\n${{ env.dnf_out }}\n"; + } + if (out != "") { + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: out, + }); + } + + - name: Create commit comment + if: success() && github.event_name != 'pull_request' + uses: peter-evans/commit-comment@v1 + with: + body: | + [run_id: ${{github.run_id}}](https://github.com/terrapkg/packages/actions/runs/${{github.run_id}}) + # Built RPM: ${{matrix.pkg.pkg}} (${{matrix.pkg.arch}}.fc${{matrix.version}}) + ## Lint + If you see anything below, RPMLint returned with a non-zero exit code. + + ${{ env.lint_out }} + + ## DNF + Output of `dnf in --downloadonly ...`. + If you see anything below, DNF returned with a non-zero exit code. + + ${{ env.dnf_out }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a925be455f..bc97353ab2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build Packages +name: Manual Builds on: workflow_dispatch: inputs: diff --git a/.github/workflows/json-build.yml b/.github/workflows/json-build.yml index 9a460fd7ae..8124102412 100644 --- a/.github/workflows/json-build.yml +++ b/.github/workflows/json-build.yml @@ -1,4 +1,4 @@ -name: Build Packages (JSON) +name: JSON Build on: workflow_dispatch: inputs: diff --git a/.github/workflows/update-nightly.yml b/.github/workflows/update-nightly.yml index 4d90f1241d..2add134544 100644 --- a/.github/workflows/update-nightly.yml +++ b/.github/workflows/update-nightly.yml @@ -1,4 +1,4 @@ -name: Automatic Nightly Update +name: Nightly Update on: schedule: - cron: "0 0 * * *" diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 3891c39a73..7d5aa0e836 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -1,4 +1,4 @@ -name: Automatically check for updates +name: Update on: schedule: - cron: "*/30 * * * *"