Skip to content

ponyc-nightly-image-pushed #340

ponyc-nightly-image-pushed

ponyc-nightly-image-pushed #340

name: Update nightly images
on:
repository_dispatch:
types:
- ponyc-nightly-image-pushed
workflow_dispatch:
push:
branches:
- main
concurrency:
group: "rebuild-nightly-images"
cancel-in-progress: true
permissions:
packages: write
jobs:
rebuild-nightly-image:
name: Rebuild nightly image
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v6.0.2
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push to GitHub Container Registry
run: |
make build-nightly
make push-nightly
- 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:
- rebuild-nightly-image
name: Prune untagged images
runs-on: ubuntu-latest
steps:
- name: Prune
# v3.1.0
uses: snok/container-retention-policy@d3bdcf5ce9b05f685154e4a16c39233b245e3d53
with:
account: ponylang
token: ${{ secrets.GITHUB_TOKEN }}
image-names: library-documentation-action-v2
tag-selection: untagged
cut-off: 1d
- 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.