cloudsmith-package-synchronised #23539
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: Cloudsmith package synchronised | |
on: | |
repository_dispatch: | |
types: | |
- cloudsmith-package-synchronised | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
packages: write | |
jobs: | |
build-latest-gnu-docker-image: | |
if: | | |
github.event.client_payload.data.repository == 'nightlies' && | |
github.event.client_payload.data.name == 'ponyc-x86-64-unknown-linux-ubuntu24.04.tar.gz' | |
name: Build latest GNU 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 .dockerfiles/latest/x86-64-unknown-linux-gnu/build-and-push.bash | |
- name: 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. | |
build-latest-musl-docker-image: | |
if: | | |
github.event.client_payload.data.repository == 'nightlies' && | |
github.event.client_payload.data.name == 'ponyc-x86-64-unknown-linux-musl.tar.gz' | |
name: Build latest musl 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 .dockerfiles/latest/x86-64-unknown-linux-musl/build-and-push.bash | |
- name: 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. | |
build-latest-windows-docker-image: | |
if: | | |
github.event.client_payload.data.repository == 'nightlies' && | |
github.event.client_payload.data.name == 'ponyc-x86-64-pc-windows-msvc.zip' | |
name: Build latest Windows Docker image | |
runs-on: windows-2022 | |
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: .dockerfiles/latest/x86-64-pc-windows-msvc/build-and-push.ps1 | |
- name: 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. | |
build-release-gnu-docker-image: | |
if: | | |
github.event.client_payload.data.repository == 'releases' && | |
github.event.client_payload.data.name == 'ponyc-x86-64-unknown-linux-ubuntu24.04.tar.gz' | |
name: Build release GNU 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 .dockerfiles/release/x86-64-unknown-linux-gnu/build-and-push.bash | |
env: | |
VERSION: ${{ github.event.client_payload.data.version }} | |
build-release-musl-docker-image: | |
if: | | |
github.event.client_payload.data.repository == 'releases' && | |
github.event.client_payload.data.name == 'ponyc-x86-64-unknown-linux-musl.tar.gz' | |
name: Build release musl 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 .dockerfiles/release/x86-64-unknown-linux-musl/build-and-push.bash | |
env: | |
VERSION: ${{ github.event.client_payload.data.version }} | |
build-release-windows-docker-image: | |
if: | | |
github.event.client_payload.data.repository == 'releases' && | |
github.event.client_payload.data.name == 'ponyc-x86-64-pc-windows-msvc.zip' | |
name: Build release Windows Docker image | |
runs-on: windows-2022 | |
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: .dockerfiles/release/x86-64-pc-windows-msvc/build-and-push.ps1 | |
env: | |
VERSION: ${{ github.event.client_payload.data.version }} | |
update-playground-image-on-release: | |
needs: | |
- build-release-musl-docker-image | |
name: Update https://playground.ponylang.io/ | |
runs-on: ubuntu-latest | |
steps: | |
- name: Run remote command | |
uses: ponylang-main/ssh-action@ffff33f8fe0318345a4f00f0e847325954b2a3ed | |
with: | |
host: ${{ secrets.PLAYGROUND_HOST }} | |
username: ${{ secrets.PLAYGROUND_ADMIN_USER }} | |
key: ${{ secrets.PLAYGROUND_KEY }} | |
script: bash update-playground.bash | |
update-stdlib-builder-image-on-release: | |
needs: | |
- build-release-musl-docker-image | |
name: Update stdlib-builder Docker image with newly released ponyc version | |
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-dockerfiles/stdlib-builder/build-and-push.bash | |
env: | |
MATERIAL_INSIDERS_ACCESS: ${{ secrets.MATERIAL_INSIDERS_ACCESS }} | |
update-stdlib-builder-image-on-nightly: | |
needs: | |
- build-latest-musl-docker-image | |
name: Update stdlib-builder Docker image with nightly ponyc version | |
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-dockerfiles/stdlib-builder/build-and-push.bash | |
env: | |
MATERIAL_INSIDERS_ACCESS: ${{ secrets.MATERIAL_INSIDERS_ACCESS }} | |
- name: 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. | |
build-and-push-stdlib-documentation: | |
needs: | |
- update-stdlib-builder-image-on-release | |
name: Build and Push standard library documentation | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/ponylang/ponyc-ci-stdlib-builder:release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.1.1 | |
- name: Build | |
run: "bash .ci-scripts/build-stdlib-documentation.bash" | |
- name: Setup Pages | |
uses: actions/configure-pages@v2 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: 'stdlib-docs/site/' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 | |
trigger-release-announcement: | |
needs: | |
- build-and-push-stdlib-documentation | |
- update-playground-image-on-release | |
name: Trigger release announcement | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@v4.1.1 | |
with: | |
ref: "main" | |
token: ${{ secrets.RELEASE_TOKEN }} | |
- name: Trigger | |
uses: docker://ghcr.io/ponylang/release-bot-action:0.6.3 | |
with: | |
entrypoint: trigger-release-announcement | |
env: | |
GIT_USER_NAME: "Ponylang Main Bot" | |
GIT_USER_EMAIL: "ponylang.main@gmail.com" | |
CUSTOM_VERSION: ${{ github.event.client_payload.data.version }} | |
test-building-stdlib-documentation: | |
needs: | |
- update-stdlib-builder-image-on-nightly | |
name: Test building standard library documentation | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/ponylang/ponyc-ci-stdlib-builder:latest | |
steps: | |
- uses: actions/checkout@v4.1.1 | |
- name: Build | |
run: "bash .ci-scripts/build-stdlib-documentation.bash" | |
- name: 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-stdlib-builders: | |
needs: | |
- update-stdlib-builder-image-on-nightly | |
name: Prune untagged stdlib builders | |
runs-on: ubuntu-latest | |
steps: | |
- name: Prune | |
# v4.1.1 | |
uses: actions/delete-package-versions@0d39a63126868f5eefaa47169615edd3c0f61e20 | |
with: | |
package-name: 'ponyc-ci-stdlib-builder' | |
package-type: 'container' | |
min-versions-to-keep: 0 | |
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. | |
send-x86-64-macos-nightly-release-event: | |
if: | | |
github.event.client_payload.data.repository == 'nightlies' && | |
github.event.client_payload.data.name == 'ponyc-x86-64-apple-darwin.tar.gz' | |
name: Send x86-64 macos nightly release event | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
repo: | |
- ponylang/corral | |
- ponylang/ponyup | |
steps: | |
- name: Send | |
# v2.1.1 | |
uses: peter-evans/repository-dispatch@8324ecf35877f9b02961dd5aaf43ed7be7db9373 | |
with: | |
token: ${{ secrets.PONYLANG_MAIN_API_TOKEN }} | |
repository: ${{ matrix.repo }} | |
event-type: ponyc-x86_64-macos-nightly-released | |
client-payload: '{"version": "${{ github.event.client_payload.data.version }}"}' | |
- name: 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. | |
send-arm64-macos-nightly-release-event: | |
if: | | |
github.event.client_payload.data.repository == 'nightlies' && | |
github.event.client_payload.data.name == 'ponyc-arm64-apple-darwin.tar.gz' | |
name: Send arm64 macos nightly release event | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
repo: | |
- ponylang/corral | |
- ponylang/ponyup | |
steps: | |
- name: Send | |
# v2.1.1 | |
uses: peter-evans/repository-dispatch@8324ecf35877f9b02961dd5aaf43ed7be7db9373 | |
with: | |
token: ${{ secrets.PONYLANG_MAIN_API_TOKEN }} | |
repository: ${{ matrix.repo }} | |
event-type: ponyc-arm64-macos-nightly-released | |
client-payload: '{"version": "${{ github.event.client_payload.data.version }}"}' | |
- name: 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. | |
send-musl-nightly-release-event: | |
needs: [build-latest-musl-docker-image] | |
name: Send musl nightly release event | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
repo: | |
- ponylang/library-documentation-action-v2 | |
- ponylang/shared-docker | |
steps: | |
- name: Send | |
# v2.1.1 | |
uses: peter-evans/repository-dispatch@8324ecf35877f9b02961dd5aaf43ed7be7db9373 | |
with: | |
token: ${{ secrets.PONYLANG_MAIN_API_TOKEN }} | |
repository: ${{ matrix.repo }} | |
event-type: ponyc-musl-nightly-released | |
client-payload: '{"version": "${{ github.event.client_payload.data.version }}"}' | |
- name: 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. | |
send-windows-nightly-release-event: | |
needs: [build-latest-windows-docker-image] | |
name: Send windows nightly release event | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
repo: | |
- ponylang/corral | |
steps: | |
- name: Send | |
# v2.1.1 | |
uses: peter-evans/repository-dispatch@8324ecf35877f9b02961dd5aaf43ed7be7db9373 | |
with: | |
token: ${{ secrets.PONYLANG_MAIN_API_TOKEN }} | |
repository: ${{ matrix.repo }} | |
event-type: ponyc-windows-nightly-released | |
client-payload: '{"version": "${{ github.event.client_payload.data.version }}"}' | |
- name: 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. | |
send-musl-release-event: | |
needs: [build-release-musl-docker-image] | |
name: Send release event | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
repo: | |
- ponylang/library-documentation-action | |
- ponylang/library-documentation-action-v2 | |
- ponylang/shared-docker | |
steps: | |
- name: Send | |
# v2.1.1 | |
uses: peter-evans/repository-dispatch@8324ecf35877f9b02961dd5aaf43ed7be7db9373 | |
with: | |
token: ${{ secrets.PONYLANG_MAIN_API_TOKEN }} | |
repository: ${{ matrix.repo }} | |
event-type: ponyc-musl-released | |
client-payload: '{"version": "${{ github.event.client_payload.data.version }}"}' | |
prune-untagged-images: | |
needs: | |
- build-latest-musl-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: 'ponyc' | |
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. |