ponyc-musl-nightly-released #653
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: Update latest images | |
on: | |
repository_dispatch: | |
types: | |
- ponyc-musl-nightly-released | |
workflow_dispatch: | |
concurrency: | |
group: "rebuild-latest-images" | |
cancel-in-progress: true | |
jobs: | |
rebuild-public-latest-image: | |
name: Rebuild latest public image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/[email protected] | |
- 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 to GitHub Container Registry | |
run: | | |
make build-latest config=public | |
make push-latest config=public | |
- name: Send alert on failure | |
if: ${{ failure() }} | |
uses: zulip/github-actions-zulip/send-message@08b6fbd07f5834e5b930a85bc7740e9fd44ab2e7 | |
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. | |
rebuild-private-latest-image: | |
name: Rebuild latest private image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/[email protected] | |
- 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 | |
run: make build-latest config=private | |
env: | |
MATERIAL_INSIDERS_ACCESS: ${{ secrets.MATERIAL_INSIDERS_ACCESS }} | |
- name: Push | |
run: make push-latest config=private | |
- name: Send alert on failure | |
if: ${{ failure() }} | |
uses: zulip/github-actions-zulip/send-message@08b6fbd07f5834e5b930a85bc7740e9fd44ab2e7 | |
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-public-images: | |
needs: | |
- rebuild-public-latest-image | |
name: Prune untagged public images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Prune | |
# v4.1.1 | |
uses: actions/delete-package-versions@0d39a63126868f5eefaa47169615edd3c0f61e20 | |
with: | |
package-name: 'library-documentation-action-v2' | |
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@08b6fbd07f5834e5b930a85bc7740e9fd44ab2e7 | |
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-private-images: | |
needs: | |
- rebuild-private-latest-image | |
name: Prune untagged private images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Prune | |
# v4.1.1 | |
uses: actions/delete-package-versions@0d39a63126868f5eefaa47169615edd3c0f61e20 | |
with: | |
package-name: 'library-documentation-action-v2-insiders' | |
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@08b6fbd07f5834e5b930a85bc7740e9fd44ab2e7 | |
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. |