Repo: Check composite action versions #24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- # Check for outdated GitHub Action version pins in composite action files | |
| # Maintain in repo: funfair-server-template | |
| name: "Repo: Check composite action versions" | |
| on: | |
| schedule: | |
| - cron: "30 3 * * *" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{github.workflow}}-${{github.ref}} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| check-composite-action-versions: | |
| if: endsWith(github.repository, '-template') | |
| runs-on: [self-hosted, linux, build] | |
| steps: | |
| - name: "Initialise Workspace" | |
| if: runner.environment == 'self-hosted' | |
| shell: bash | |
| run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" | |
| - name: "Set Active Environment" | |
| shell: bash | |
| run: | | |
| { | |
| echo "ACTIVE_RUNNER_NAME=${{runner.name}}" | |
| echo "ACTIVE_HOSTNAME=$HOSTNAME" | |
| echo "ACTIVE_USER=$USER" | |
| } >> "$GITHUB_ENV" | |
| - name: "Checkout" | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: "Check Required Secrets" | |
| shell: bash | |
| run: | | |
| if [ -z "${{secrets.SOURCE_PUSH_TOKEN}}" ]; then | |
| echo "::error::SOURCE_PUSH_TOKEN is required but not set" | |
| exit 1 | |
| fi | |
| - name: "Check Composite Action Versions" | |
| uses: ./.github/actions/check-composite-action-versions | |
| with: | |
| GITHUB_TOKEN: ${{secrets.SOURCE_PUSH_TOKEN}} |