ponyc-musl-nightly-released #291
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/checkout@v3 | |
- name: Login to Docker Hub | |
run: docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" | |
env: | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
- name: Build | |
run: make build-latest config=public | |
- name: Push | |
run: make push-latest config=public | |
- name: Send alert on failure | |
if: ${{ failure() }} | |
uses: zulip/github-actions-zulip/send-message@b62d5a0e48a4d984ea4fce5dd65ba691963d4db4 | |
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/checkout@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
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@b62d5a0e48a4d984ea4fce5dd65ba691963d4db4 | |
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: | |
- rebuild-private-latest-image | |
name: Prune untagged 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@b62d5a0e48a4d984ea4fce5dd65ba691963d4db4 | |
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. |