Build linter images #1
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: Build linter images | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| actionlint: | |
| name: Build and push actionlint | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: actionlint | |
| cancel-in-progress: true | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| - name: Login to GitHub Container Registry | |
| # v2.2.0 | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| run: bash actionlint/build-and-push.bash | |
| - name: Send alert on failure | |
| if: ${{ failure() }} | |
| uses: zulip/github-actions-zulip/send-message@bd8ec52de371d139ae8313661b7d8318c19266aa | |
| with: | |
| api-key: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_API_KEY }} | |
| email: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_EMAIL }} | |
| organization-url: 'https://ponylang.zulipchat.com/' | |
| to: notifications | |
| type: stream | |
| topic: ${{ github.repository }} scheduled job failure | |
| content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed. | |
| markdownlint: | |
| name: Build and push markdownlint | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: markdownlint | |
| cancel-in-progress: true | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| - name: Login to GitHub Container Registry | |
| # v2.2.0 | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| run: bash markdownlint/build-and-push.bash | |
| - name: Send alert on failure | |
| if: ${{ failure() }} | |
| uses: zulip/github-actions-zulip/send-message@bd8ec52de371d139ae8313661b7d8318c19266aa | |
| with: | |
| api-key: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_API_KEY }} | |
| email: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_EMAIL }} | |
| organization-url: 'https://ponylang.zulipchat.com/' | |
| to: notifications | |
| type: stream | |
| topic: ${{ github.repository }} scheduled job failure | |
| content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed. | |
| shellcheck: | |
| name: Build and push shellcheck | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: shellcheck | |
| cancel-in-progress: true | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| - name: Login to GitHub Container Registry | |
| # v2.2.0 | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| run: bash shellcheck/build-and-push.bash | |
| - name: Send alert on failure | |
| if: ${{ failure() }} | |
| uses: zulip/github-actions-zulip/send-message@bd8ec52de371d139ae8313661b7d8318c19266aa | |
| with: | |
| api-key: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_API_KEY }} | |
| email: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_EMAIL }} | |
| organization-url: 'https://ponylang.zulipchat.com/' | |
| to: notifications | |
| type: stream | |
| topic: ${{ github.repository }} scheduled job failure | |
| content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed. | |
| prune-untagged-images: | |
| needs: | |
| - actionlint | |
| - markdownlint | |
| - shellcheck | |
| name: Prune untagged images | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| image: | |
| - shared-docker-ci-actionlint | |
| - shared-docker-ci-markdownlint | |
| - shared-docker-ci-shellcheck | |
| steps: | |
| - name: Prune | |
| # v5.0.0 | |
| uses: actions/delete-package-versions@e5bc658cc4c965c472efe991f8beea3981499c55 | |
| with: | |
| package-name: ${{ matrix.image }} | |
| package-type: 'container' | |
| min-versions-to-keep: 1 | |
| delete-only-untagged-versions: 'true' | |
| - name: Send alert on failure | |
| if: ${{ failure() }} | |
| uses: zulip/github-actions-zulip/send-message@bd8ec52de371d139ae8313661b7d8318c19266aa | |
| with: | |
| api-key: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_API_KEY }} | |
| email: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_EMAIL }} | |
| organization-url: 'https://ponylang.zulipchat.com/' | |
| to: notifications | |
| type: stream | |
| topic: ${{ github.repository }} scheduled job failure | |
| content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed. |