chore(ci): enable auto-merge label for dependabot and workflows #14
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Check shell script syntax | |
| run: | | |
| bash -n src/atlas/install.sh | |
| bash -n src/psql/install.sh | |
| - name: Install latest devcontainer CLI | |
| run: npm install -g @devcontainers/cli | |
| - name: Test atlas feature | |
| run: devcontainer features test -f atlas -i mcr.microsoft.com/devcontainers/base:ubuntu . | |
| - name: Test psql feature | |
| run: devcontainer features test -f psql -i mcr.microsoft.com/devcontainers/base:ubuntu . | |
| validate: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Validate devcontainer-feature.json files | |
| uses: devcontainers/action@v1 | |
| with: | |
| validate-only: "true" | |
| base-path-to-features: "./src" | |
| release: | |
| needs: [test, validate] | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| timeout-minutes: 15 | |
| outputs: | |
| releases_created: ${{ steps.release.outputs.releases_created }} | |
| pr: ${{ steps.release.outputs.pr }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Create Release PR | |
| id: release | |
| uses: googleapis/release-please-action@v5 | |
| with: | |
| config-file: .github/config/release-please-config.json | |
| manifest-file: .github/config/release-please-manifest.json | |
| update-docs: | |
| needs: release | |
| if: ${{ needs.release.outputs.pr != '' }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ fromJSON(needs.release.outputs.pr).headBranchName }} | |
| - name: Generate Documentation | |
| uses: devcontainers/action@v1 | |
| with: | |
| generate-docs: "true" | |
| base-path-to-features: "./src" | |
| features-namespace: devcontainer-env/features | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Commit Documentation | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add src/**/README.md | |
| git diff --cached --quiet || git commit -m "docs: update auto-generated documentation" | |
| git push | |
| publish: | |
| needs: release | |
| if: ${{ needs.release.outputs.releases_created == 'true' }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Publish Features | |
| uses: devcontainers/action@v1 | |
| with: | |
| publish-features: "true" | |
| base-path-to-features: "./src" | |
| features-namespace: devcontainer-env/features | |
| disable-repo-tagging: "true" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |