diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8a362496..9cc3152f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,8 +4,12 @@ updates: directory: "/" # Location of package manifests schedule: interval: "daily" + cooldown: + default-days: 7 # Maintain dependencies for GitHub Actions - package-ecosystem: "github-actions" directory: "/" schedule: interval: "daily" + cooldown: + default-days: 7 diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index a8f9a0c0..e6982cea 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -10,6 +10,8 @@ concurrency: group: build-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true +permissions: {} + jobs: tox: @@ -28,9 +30,10 @@ jobs: TOXENV: ${{ format('py{0}{1}-{2}', matrix.py-ver-major, matrix.py-ver-minor, matrix.step) }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: fetch-depth: 0 + persist-credentials: false - name: Set up Singularity if: ${{ matrix.step == 'unit' || matrix.step == 'mypy' }} @@ -39,7 +42,7 @@ jobs: sudo apt-get install -y ./singularity-ce_4.2.1-noble_amd64.deb - name: Set up Python - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 with: allow-prereleases: true python-version: ${{ env.py-semver }} @@ -57,7 +60,7 @@ jobs: - name: MyPy cache if: ${{ matrix.step == 'mypy' }} - uses: actions/cache@v5 + uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 with: path: .mypy_cache/${{ env.py-semver }} key: mypy-${{ env.py-semver }} @@ -67,7 +70,7 @@ jobs: - name: Upload coverage to Codecov if: ${{ matrix.step == 'unit' }} - uses: codecov/codecov-action@v6 + uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: @@ -87,12 +90,13 @@ jobs: TOXENV: ${{ format('py312-{0}', matrix.step) }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: fetch-depth: 0 + persist-credentials: false - name: Set up Python - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 with: python-version: ${{ env.py-semver }} cache: pip @@ -104,7 +108,10 @@ jobs: - if: ${{ matrix.step == 'pydocstyle' && github.event_name == 'pull_request'}} name: Create local branch for diff-quality for PRs - run: git branch ${{github.base_ref}} origin/${{github.base_ref}} + run: git branch "${GITHUB_BASE_REF}" "origin/${GITHUB_BASE_REF}" + env: + GITHUB_BASE_REF: ${{ github.base_ref }} + - name: Test with tox run: tox @@ -114,7 +121,9 @@ jobs: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + persist-credentials: false - name: Set up Singularity run: | @@ -131,7 +140,7 @@ jobs: echo "CWL_SINGULARITY_CACHE=${CWL_SINGULARITY_CACHE}" >> "$GITHUB_ENV" - name: Set up Python - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 with: python-version: 3.12 cache: pip diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 26b3c472..5dc81cee 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -22,17 +22,18 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. fetch-depth: 2 + persist-credentials: false # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v4 + uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4 with: languages: python - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v4 + uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4 diff --git a/.github/workflows/tag_to_publish.yml b/.github/workflows/tag_to_publish.yml index 20ee3d03..c75a04bf 100644 --- a/.github/workflows/tag_to_publish.yml +++ b/.github/workflows/tag_to_publish.yml @@ -16,7 +16,9 @@ jobs: permissions: id-token: write steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + persist-credentials: false - name: Set up Singularity run: | @@ -24,10 +26,9 @@ jobs: sudo apt-get install -y ./singularity-ce_4.2.1-noble_amd64.deb - name: Set up Python - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 with: python-version: 3.12 - cache: pip - name: Install packages run: | @@ -40,6 +41,6 @@ jobs: run: ./release-test.sh - name: Publish package - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0 with: packages-dir: testenv2/src/cwl-utils/dist/