Compare commits

..

3 commits

Author SHA1 Message Date
7aaeaee4c4
feat: use download-artifact instead of manually downloading it
Some checks failed
/ check (treefmt) (push) Successful in 3s
/ report-size (push) Failing after 2s
/ report-download-check (push) Has been skipped
This should hopefully work on private repos too!
2025-05-14 22:09:24 +02:00
b7e76df813
feat: test that the report is generated
All checks were successful
/ check (treefmt) (push) Successful in 3s
/ report-size (push) Successful in 1s
/ report-download-check (push) Successful in 0s
This ensures we can download the artifact.
2025-05-13 21:34:47 +02:00
dfc3c31e70
ci: only run the renovate config check if the config changes
All checks were successful
/ check (treefmt) (push) Successful in 3s
/ report-size (push) Successful in 2s
Otherwise it's just wasting time.
2025-05-13 21:30:15 +02:00
3 changed files with 25 additions and 18 deletions

View file

@ -14,14 +14,6 @@ jobs:
nix --version nix --version
# shellcheck disable=SC2016 # shellcheck disable=SC2016
nix build --print-build-logs '.#checks.x86_64-linux.${{ matrix.check }}' nix build --print-build-logs '.#checks.x86_64-linux.${{ matrix.check }}'
check-renovaterc:
runs-on: nixos
steps:
- uses: "https://git.salame.cl/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4
- name: Validate renovaterc.json
run: |
nix --version
nix shell nixpkgs#renovate --command renovate-config-validator
report-size: report-size:
runs-on: nixos runs-on: nixos
needs: check needs: check
@ -35,13 +27,14 @@ jobs:
comment-on-pr: ${{ github.ref_name != 'main' }} comment-on-pr: ${{ github.ref_name != 'main' }}
# Generate artifacts on main (to speed up comparisons) # Generate artifacts on main (to speed up comparisons)
# generate-artifact: ${{ github.ref_name == 'main' }} # generate-artifact: ${{ github.ref_name == 'main' }}
# For testing always generate artifacts # Always generate artifacts for testing purposes
generate-artifact: 'true' generate-artifact: 'true'
github-token: ${{ secrets.ARTIFACT_TOKEN }}
# Generate comparisons to main # Generate comparisons to main
do-comparison: 'true' do-comparison: 'true'
# This job's name (so we can find the artifacts) # This job's name (so we can find the artifacts)
job-name: report-size job-name: report-size
# A token is required to download a previous run's artifact
github-token: ${{ secrets.FULL_PERM_TEST }}
report-download-check: report-download-check:
runs-on: nixos runs-on: nixos
needs: report-size needs: report-size

View file

@ -0,0 +1,14 @@
on:
push:
paths:
# only run if the renovate config changed
- renovate.json
jobs:
check-renovaterc:
runs-on: nixos
steps:
- uses: "https://git.salame.cl/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4
- name: Validate renovaterc.json
run: |
nix --version
nix shell nixpkgs#renovate --command renovate-config-validator

View file

@ -144,14 +144,14 @@ runs:
echo "run-id=$run_id" >> "$GITHUB_OUTPUT" echo "run-id=$run_id" >> "$GITHUB_OUTPUT"
log Would try to download "$ARTIFACT_NAME" from "$run_id" log Would try to download "$ARTIFACT_NAME" from "$run_id"
# - name: Download previous report - name: Download previous report
# uses: https://git.salame.cl/actions/download-artifact@d8d0a99033603453ad2255e58720b460a0555e1e # v4 uses: https://git.salame.cl/actions/download-artifact@d8d0a99033603453ad2255e58720b460a0555e1e # v4
# # Ensure the previous step succeeded # Ensure the previous step succeeded
# if: steps.previous-report.outcome == 'success' if: steps.previous-report.outcome == 'success'
# with: with:
# name: ${{ inputs.artifact-name }} name: ${{ inputs.artifact-name }}
# github-token: ${{ inputs.github-token }} github-token: ${{ inputs.github-token }}
# run-id: ${{ steps.previous-report.outputs.run-id }} run-id: ${{ steps.previous-report.outputs.run-id }}
- name: Create report - name: Create report
if: inputs.comment-on-pr == 'true' || inputs.generate-artifact == 'true' if: inputs.comment-on-pr == 'true' || inputs.generate-artifact == 'true'
env: env: