ci: rename ci workflow to match template, add sync.yml for templating #1
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 | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| general_ci: | |
| uses: voxpupuli/crafty/.github/workflows/general_ci.yaml@main | |
| with: | |
| shellcheck_scan_dir: '.' | |
| setup-matrix: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| build_matrix: ${{ steps.set-build-matrix.outputs.build_matrix }} | |
| steps: | |
| - name: Source checkout | |
| uses: actions/checkout@v7 | |
| - name: 'Setup yq' | |
| uses: dcarbone/install-yq-action@v1.3.1 | |
| - id: set-build-matrix | |
| run: echo "build_matrix=$(bash matrix.sh build)" >> $GITHUB_OUTPUT | |
| build_test_container: | |
| name: 'Build test container' | |
| runs-on: ${{ matrix.runner }} | |
| needs: setup-matrix | |
| strategy: | |
| matrix: ${{ fromJson(needs.setup-matrix.outputs.build_matrix) }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Build image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| tags: 'ci/test:${{ matrix.source_webhook_go }}' | |
| push: false | |
| file: Containerfile | |
| build-args: | | |
| R10K_VERSION=${{ matrix.container_r10k }} | |
| WEBHOOK_GO_VERSION=${{ matrix.source_webhook_go }} | |
| platforms: linux/${{ matrix.platform }} | |
| tests: | |
| needs: | |
| - general_ci | |
| - build_test_container | |
| runs-on: ubuntu-latest | |
| name: Test suite | |
| steps: | |
| - run: echo Test suite completed | |
| dependabot: | |
| permissions: | |
| contents: write | |
| name: 'Dependabot auto-merge' | |
| needs: | |
| - tests | |
| runs-on: ubuntu-latest | |
| if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} | |
| steps: | |
| - name: Dependabot metadata | |
| id: metadata | |
| uses: dependabot/fetch-metadata@v3.1.0 | |
| with: | |
| github-token: '${{ secrets.GITHUB_TOKEN }}' | |
| - name: Enable auto-merge for Dependabot PRs | |
| run: gh pr merge --auto --merge "$PR_URL" | |
| env: | |
| PR_URL: ${{github.event.pull_request.html_url}} | |
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |