|
12 | 12 | build:
|
13 | 13 | runs-on: ubuntu-latest
|
14 | 14 | permissions:
|
15 |
| - contents: read |
| 15 | + contents: write |
16 | 16 | packages: write
|
17 | 17 |
|
18 | 18 | steps:
|
|
45 | 45 | labels: ${{ steps.meta.outputs.labels }}
|
46 | 46 | build-args: |
|
47 | 47 | VERSION=${{ steps.meta.outputs.version }}
|
| 48 | +
|
| 49 | + - name: extract amd64 binary from the image |
| 50 | + run: | |
| 51 | + docker create --platform linux/amd64 --name amd64 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }} && |
| 52 | + docker cp amd64:/usr/bin/coroot-node-agent /tmp/coroot-node-agent-amd64 |
| 53 | +
|
| 54 | + - name: extract arm64 binary from the image |
| 55 | + run: | |
| 56 | + docker create --platform linux/arm64 --name arm64 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }} && |
| 57 | + docker cp arm64:/usr/bin/coroot-node-agent /tmp/coroot-node-agent-arm64 |
| 58 | +
|
| 59 | + - name: upload amd64 binary |
| 60 | + uses: actions/upload-release-asset@v1 |
| 61 | + env: |
| 62 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 63 | + with: |
| 64 | + upload_url: ${{ github.event.release.upload_url }} |
| 65 | + asset_path: /tmp/coroot-node-agent-amd64 |
| 66 | + asset_name: coroot-node-agent-amd64 |
| 67 | + asset_content_type: application/octet-stream |
| 68 | + |
| 69 | + - name: upload arm64 binary |
| 70 | + uses: actions/upload-release-asset@v1 |
| 71 | + env: |
| 72 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 73 | + with: |
| 74 | + upload_url: ${{ github.event.release.upload_url }} |
| 75 | + asset_path: /tmp/coroot-node-agent-arm64 |
| 76 | + asset_name: coroot-node-agent-arm64 |
| 77 | + asset_content_type: application/octet-stream |
| 78 | + |
| 79 | + - uses: actions/github-script@v7 |
| 80 | + env: |
| 81 | + RELEASE_ID: ${{ github.event.release.id }} |
| 82 | + with: |
| 83 | + script: | |
| 84 | + const { RELEASE_ID } = process.env |
| 85 | + github.rest.repos.updateRelease({ |
| 86 | + owner: context.repo.owner, |
| 87 | + repo: context.repo.repo, |
| 88 | + release_id: `${RELEASE_ID}`, |
| 89 | + prerelease: false, |
| 90 | + make_latest: true |
| 91 | + }) |
| 92 | + |
| 93 | +
|
0 commit comments