build(deps): bump actions/checkout from 4 to 5 #17
Workflow file for this run
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
| name: "CI - Test Features" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| variables: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - id: set-matrix | |
| run: | | |
| set_output () { | |
| if [[ -z "${ACT}" ]]; then | |
| echo "${1}=${2}" | tee -a "${GITHUB_OUTPUT}" | |
| else | |
| echo "set-output name=${1}::${2}" | |
| echo "::set-output name=${1}::${2}" | |
| fi | |
| } | |
| set_output matrix "`find . -iname 'devcontainer-feature.json' -exec bash -c \"basename \\$(dirname \\"{}\\")\" \\; | jq -R -s -c 'split(\"\n\")[:-1]'`" | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: "Validate devcontainer-feature.json files" | |
| uses: devcontainers/action@v1 | |
| with: | |
| validate-only: "true" | |
| base-path-to-features: "./src" | |
| test-autogenerated: | |
| runs-on: ubuntu-latest | |
| needs: variables | |
| continue-on-error: true | |
| strategy: | |
| matrix: | |
| features: ${{ fromJson(needs.variables.outputs.matrix) }} | |
| baseImage: | |
| - debian:latest | |
| - ubuntu:latest | |
| - mcr.microsoft.com/devcontainers/base:ubuntu | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: "Install latest devcontainer CLI" | |
| run: npm install -g @devcontainers/cli | |
| - name: "Generating tests for '${{ matrix.features }}' against '${{ matrix.baseImage }}'" | |
| run: devcontainer features test --skip-scenarios -f ${{ matrix.features }} -i ${{ matrix.baseImage }} . | |
| test-scenarios: | |
| runs-on: ubuntu-latest | |
| needs: variables | |
| continue-on-error: true | |
| strategy: | |
| matrix: | |
| features: ${{ fromJson(needs.variables.outputs.matrix) }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: "Install latest devcontainer CLI" | |
| run: npm install -g @devcontainers/cli | |
| - name: "Generating tests for '${{ matrix.features }}' scenarios" | |
| run: devcontainer features test -f ${{ matrix.features }} --skip-autogenerated . | |
| test-global: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: "Install latest devcontainer CLI" | |
| run: npm install -g @devcontainers/cli | |
| - name: "Testing global scenarios" | |
| run: devcontainer features test --global-scenarios-only . | |
| deploy: | |
| needs: | |
| - test-global | |
| - test-autogenerated | |
| - test-scenarios | |
| - validate | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: "Publish Features" | |
| uses: devcontainers/action@v1 | |
| with: | |
| publish-features: "true" | |
| base-path-to-features: "./src" | |
| generate-docs: "true" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create PR for Documentation | |
| id: push_image_info | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| set -e | |
| echo "Start." | |
| # Configure git and Push updates | |
| git config --global user.email github-actions@github.com | |
| git config --global user.name github-actions | |
| message='Automated documentation update' | |
| git add */**/README.md | |
| git commit -m 'Automated documentation update [skip ci]' || export NO_UPDATES=true | |
| # Push | |
| if [ "$NO_UPDATES" != "true" ] ; then | |
| git push origin main | |
| fi | |
| dependabot-automerge: | |
| needs: | |
| - test-global | |
| - test-autogenerated | |
| - test-scenarios | |
| - validate | |
| name: Dependabot Auto Merge | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| steps: | |
| - uses: fastify/github-action-merge-dependabot@main |