From 7fd846a6caa5fcc4a9ac287a136c12e00f513c7e Mon Sep 17 00:00:00 2001 From: Tim Thacker Date: Sun, 25 Oct 2026 00:26:10 +1100 Subject: [PATCH] perf(ci): move public workflows to free GitHub runners --- .github/actionlint.yaml | 3 -- .github/workflows/ci-require-labels.yml | 2 +- .github/workflows/release.yml | 19 +++++--- .github/workflows/yaml-lint.yml | 60 +++++++------------------ actions/clean-up-repo/action.yml | 2 +- actions/release-version/action.yml | 8 ++-- 6 files changed, 35 insertions(+), 59 deletions(-) delete mode 100644 .github/actionlint.yaml diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml deleted file mode 100644 index 95c913f..0000000 --- a/.github/actionlint.yaml +++ /dev/null @@ -1,3 +0,0 @@ -self-hosted-runner: - labels: - - office-ci-small diff --git a/.github/workflows/ci-require-labels.yml b/.github/workflows/ci-require-labels.yml index 88c92d6..381d5d1 100644 --- a/.github/workflows/ci-require-labels.yml +++ b/.github/workflows/ci-require-labels.yml @@ -11,7 +11,7 @@ permissions: jobs: require-labels: if: ${{ github.event_name == 'pull_request' }} - runs-on: office-ci-small + runs-on: ubuntu-24.04 outputs: status: ${{ steps.require-labels.outputs.status }} steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index efaabbd..e4f44c6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,26 +20,31 @@ permissions: pull-requests: read jobs: get-version: - runs-on: office-ci-small + runs-on: ubuntu-24.04 outputs: version: ${{ steps.get-version.outputs.version }} steps: - uses: actions/checkout@v6 + with: + fetch-depth: 0 + persist-credentials: false - name: Get Release Version id: get-version uses: nullify-platform/github-actions/actions/release-version@main - run: | - echo "config-file-parser @ ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY - echo "VERSION: ${{ steps.get-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY - echo "SHORT_SHA: $(git rev-parse --short HEAD)" >> $GITHUB_STEP_SUMMARY + { + echo "config-file-parser @ ${{ github.sha }}" + echo "VERSION: ${{ steps.get-version.outputs.version }}" + echo "SHORT_SHA: $(git rev-parse --short HEAD)" + } >> "$GITHUB_STEP_SUMMARY" release: if: ${{ needs.get-version.outputs.version != 'undefined' || (github.event_name == 'workflow_dispatch' && needs.get-version.outputs.version != 'undefined') }} - runs-on: office-ci-small - needs: [ get-version ] + runs-on: ubuntu-24.04 + needs: [get-version] steps: - uses: actions/checkout@v6 - name: Generate Release Tag - run: echo "RELEASE_TAG=v${{ needs.get-version.outputs.version }}" >> $GITHUB_ENV + run: echo "RELEASE_TAG=v${{ needs.get-version.outputs.version }}" >> "$GITHUB_ENV" - name: Generate Release uses: softprops/action-gh-release@v3 with: diff --git a/.github/workflows/yaml-lint.yml b/.github/workflows/yaml-lint.yml index 75b6960..bf78157 100644 --- a/.github/workflows/yaml-lint.yml +++ b/.github/workflows/yaml-lint.yml @@ -3,53 +3,27 @@ name: PR Check - YAML Lint on: pull_request: - branches: [master] + branches: [main] + paths: + - '**.yml' + - '**.yaml' + - .github/workflows/.yamllint + +permissions: + contents: read jobs: yaml-lint: name: yaml-lint - runs-on: office-ci-small + runs-on: ubuntu-24.04 steps: - - name: Checkout Repo - uses: actions/checkout@v6 - with: - fetch-depth: 1 - - - name: Get list of changed files - id: files - uses: tj-actions/changed-files@v47.0.6 - - - name: Get list of updated files to run yammlint - id: updatedFiles - run: | - for file in ${{ steps.files.outputs.all_changed_files }}; do - if [[ "$file" == *.yaml || "$file" == *.yml ]] - then - files=("${files[@]}" "$file") - fi - done - echo "files=${files[@]}" >> $GITHUB_OUTPUT - - - name: Lint YAML files - uses: karancode/yamllint-github-action@master - if: ${{ steps.updatedFiles.outputs.files }} + - uses: actions/checkout@v6 with: - yamllint_file_or_dir: ${{ steps.updatedFiles.outputs.files }} - yamllint_comment: true - yamllint_config_filepath: .github/workflows/.yamllint - env: - GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # Add approvers. Only run once; Use a label for this. - add-reviewers: - if: "!contains( toJson(github), 'reviewers-set' )" - needs: [yaml-lint] - runs-on: office-ci-small - steps: - - name: add approvers - uses: kentaro-m/auto-assign-action@v2.0.2 - - - name: label reviewers-set - uses: andymckay/labeler@master + persist-credentials: false + - uses: actions/setup-python@v6 with: - add-labels: "reviewers-set" + python-version: '3.13' + - name: Install YAML linter + run: python -m pip install yamllint==1.37.1 + - name: Lint tracked YAML files + run: git ls-files -z '*.yml' '*.yaml' | xargs -0 -r yamllint --strict --config-file .github/workflows/.yamllint diff --git a/actions/clean-up-repo/action.yml b/actions/clean-up-repo/action.yml index bd2311c..e5331ad 100644 --- a/actions/clean-up-repo/action.yml +++ b/actions/clean-up-repo/action.yml @@ -49,7 +49,7 @@ runs: remove-issue-stale-when-updated: true remove-pr-stale-when-updated: true exempt-all-milestones: true - + - name: Print stale/closed Issues and PRs shell: bash env: diff --git a/actions/release-version/action.yml b/actions/release-version/action.yml index a5cb562..4da3f00 100644 --- a/actions/release-version/action.yml +++ b/actions/release-version/action.yml @@ -4,16 +4,16 @@ branding: icon: 'cloud' color: 'purple' outputs: - version: + version: description: "Determine the next tag version" value: ${{ steps.version.outputs.result }} - latest_version: + latest_version: description: "Look up latest tag version" value: ${{ steps.vars.outputs.latest_version }} - previous_version: + previous_version: description: "Look up previous tag version" value: ${{ steps.vars.outputs.previous_version }} - short_sha: + short_sha: description: "Look up short SHA" value: ${{ steps.vars.outputs.short_sha }} runs: