feat/supernova async exec
#425
This file contains hidden or 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: Publish Docker image | |
| on: | |
| release: | |
| types: [published] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| push_to_registry: | |
| name: Push Docker image to Docker Hub | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| packages: write | |
| contents: read | |
| attestations: write | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Go 1.x | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.23.6 | |
| id: go | |
| - name: Get dependencies | |
| run: | | |
| go get -v -t -d ./... | |
| if [ -f Gopkg.toml ]; then | |
| curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | |
| dep ensure | |
| fi | |
| - name: Build and run chain simulator to fetch configs | |
| run: | | |
| cd cmd/chainsimulator | |
| go build | |
| ./chainsimulator --fetch-configs-and-close | |
| - name: Set up QEMU for ARM64 | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to Docker Hub | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Extract metadata (tags, labels) for released releases | |
| if: ${{ github.event.release.prerelease == false }} | |
| id: meta_released | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: multiversx/chainsimulator | |
| - name: Extract metadata (tags, labels) for prereleased releases | |
| if: ${{ github.event.release.prerelease == true }} | |
| id: meta_prereleased | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: multiversx/chainsimulator | |
| tags: | | |
| type=raw,value=${{ github.event.release.tag_name }} | |
| labels: | | |
| type=raw,value=${{ github.event.release.name }} | |
| - name: Build and push Docker image for released | |
| if: ${{ github.event.release.prerelease == false }} | |
| id: push_released | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: ${{ github.event_name == 'release' && github.event.action == 'published' }} | |
| tags: ${{ steps.meta_released.outputs.tags }} | |
| labels: ${{ steps.meta_released.outputs.labels }} | |
| - name: Build and push Docker image for prereleased | |
| if: ${{ github.event.release.prerelease == true }} | |
| id: push_prereleased | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: ${{ github.event_name == 'release' && github.event.action == 'published' }} | |
| tags: ${{ steps.meta_prereleased.outputs.tags }} | |
| labels: ${{ steps.meta_prereleased.outputs.labels }} |