joystream-node-docker-publish #3
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
# Publish production runtime build joystream/node:latest | |
name: joystream-node-docker-publish | |
on: | |
- workflow_dispatch | |
jobs: | |
main: | |
name: Publish joystream/node:latest docker image | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Publish manifest | |
run: | | |
SHASUM=`scripts/runtime-code-shasum.sh` | |
IMAGE=joystream/node:$SHASUM | |
LATEST_TAG=joystream/node:latest | |
docker pull $IMAGE-amd64 | |
docker pull $IMAGE-arm64 | |
docker manifest create $LATEST_TAG $IMAGE-amd64 $IMAGE-arm64 | |
docker manifest annotate $LATEST_TAG $IMAGE-amd64 --arch amd64 | |
docker manifest annotate $LATEST_TAG $IMAGE-arm64 --arch arm64 | |
docker manifest push $LATEST_TAG |