|
| 1 | +name: Build Nightly musl Image |
| 2 | + |
| 3 | +on: |
| 4 | + repository_dispatch: |
| 5 | + types: |
| 6 | + - cloudsmith-package-synchronised |
| 7 | + |
| 8 | +concurrency: |
| 9 | + group: build-nightly-musl-image |
| 10 | + cancel-in-progress: false |
| 11 | + |
| 12 | +permissions: |
| 13 | + contents: read |
| 14 | + packages: write |
| 15 | + |
| 16 | +jobs: |
| 17 | + build-nightly-musl-docker-image: |
| 18 | + if: | |
| 19 | + github.event.client_payload.data.repository == 'nightlies' && |
| 20 | + (github.event.client_payload.data.name == 'ponyc-x86-64-unknown-linux-musl.tar.gz' || |
| 21 | + github.event.client_payload.data.name == 'ponyc-arm64-unknown-linux-musl.tar.gz') |
| 22 | +
|
| 23 | + name: Build latest musl image |
| 24 | + runs-on: ubuntu-latest |
| 25 | + steps: |
| 26 | + - name: Checkout |
| 27 | + uses: actions/checkout@v4.1.1 |
| 28 | + - name: Set up Docker Buildx |
| 29 | + # v3.10.0 |
| 30 | + uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 |
| 31 | + with: |
| 32 | + version: v0.23.0 |
| 33 | + - name: Login to GitHub Container Registry |
| 34 | + # v2.2.0 |
| 35 | + uses: docker/login-action@5139682d94efc37792e6b54386b5b470a68a4737 |
| 36 | + with: |
| 37 | + registry: ghcr.io |
| 38 | + username: ${{ github.repository_owner }} |
| 39 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 40 | + - name: Build and push |
| 41 | + run: bash .dockerfiles/nightly/musl/build-and-push.bash |
| 42 | + - name: Alert on failure |
| 43 | + if: ${{ failure() }} |
| 44 | + uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 |
| 45 | + with: |
| 46 | + api-key: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_API_KEY }} |
| 47 | + email: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_EMAIL }} |
| 48 | + organization-url: 'https://ponylang.zulipchat.com/' |
| 49 | + to: notifications |
| 50 | + type: stream |
| 51 | + topic: ${{ github.repository }} scheduled job failure |
| 52 | + content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed. |
| 53 | + |
| 54 | + send-repository-dispatch-event: |
| 55 | + needs: |
| 56 | + - build-nightly-musl-docker-image |
| 57 | + |
| 58 | + name: Send |
| 59 | + runs-on: ubuntu-latest |
| 60 | + strategy: |
| 61 | + fail-fast: false |
| 62 | + matrix: |
| 63 | + repo: |
| 64 | + - ponylang/library-documentation-action-v2 |
| 65 | + - ponylang/shared-docker |
| 66 | + steps: |
| 67 | + - name: Send |
| 68 | + # v2.1.1 |
| 69 | + uses: peter-evans/repository-dispatch@8324ecf35877f9b02961dd5aaf43ed7be7db9373 |
| 70 | + with: |
| 71 | + token: ${{ secrets.PONYLANG_MAIN_API_TOKEN }} |
| 72 | + repository: ${{ matrix.repo }} |
| 73 | + event-type: ponyc-musl-nightly-released |
| 74 | + client-payload: '{"version": "${{ github.event.client_payload.data.version }}"}' |
| 75 | + - name: Alert on failure |
| 76 | + if: ${{ failure() }} |
| 77 | + uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 |
| 78 | + with: |
| 79 | + api-key: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_API_KEY }} |
| 80 | + email: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_EMAIL }} |
| 81 | + organization-url: 'https://ponylang.zulipchat.com/' |
| 82 | + to: notifications |
| 83 | + type: stream |
| 84 | + topic: ${{ github.repository }} scheduled job failure |
| 85 | + content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed. |
0 commit comments