eigenda-v3.6.4 #21
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 Nitro image | |
| on: | |
| push: | |
| branches: | |
| - main | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| env: | |
| GITHUB_REGISTRY: ghcr.io | |
| permissions: | |
| contents: read | |
| id-token: write | |
| packages: write | |
| jobs: | |
| docker: | |
| name: Build and Push Nitro image | |
| runs-on: shared-large-01 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| platforms: linux/amd64,linux/arm64 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.GITHUB_REGISTRY }} | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set lower-case repo name | |
| run: echo "REPO_LOWER=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV | |
| - name: Build and push Nitro image | |
| run: | | |
| if [[ "${{ github.event_name }}" == "release" ]]; then | |
| TAG="${{ github.event.release.tag_name }}" | |
| else | |
| TAG="latest" | |
| fi | |
| docker buildx build --target nitro-node --platform linux/amd64,linux/arm64 -t ${{ env.GITHUB_REGISTRY }}/${REPO_LOWER}/nitro:${TAG} --push . |