Update Zulip 'send message' action to latest version #28
This file contains 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 latest Docker images | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: build-latest-docker-images | |
cancel-in-progress: true | |
jobs: | |
build-latest-docker-image: | |
name: Build and push latest Docker image | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4.1.1 | |
- name: Login to GitHub Container Registry | |
# v2.2.0 | |
uses: docker/login-action@5139682d94efc37792e6b54386b5b470a68a4737 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
run: bash .ci-scripts/release/build-latest-docker-images.bash | |
- name: Send alert on failure | |
if: ${{ failure() }} | |
uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 | |
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: | |
- build-latest-docker-image | |
name: Prune untagged images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Prune | |
# v4.1.1 | |
uses: actions/delete-package-versions@0d39a63126868f5eefaa47169615edd3c0f61e20 | |
with: | |
package-name: 'ponydoc' | |
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@e4c8f27c732ba9bd98ac6be0583096dea82feea5 | |
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. |