Skip to content

ci: remove context

ci: remove context #11

Workflow file for this run

name: Github Image Build and Push
on:
push:
branches:
- "main"
- "testnet-support"
jobs:
docker:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
strategy:
matrix:
network:
- mainnet
- testnet
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set environment variables
run: |
if [ "${{ matrix.network }}" == "mainnet" ]; then
echo "NEXT_PUBLIC_NEVM_RPC_URL=https://rpc.syscoin.org" >> $GITHUB_ENV
echo "NEXT_PUBLIC_IS_TESTNET=false" >> $GITHUB_ENV
echo "NEXT_PUBLIC_NEVM_EXPLORER_URL=https://explorer.syscoin.org" >> $GITHUB_ENV
echo "NEXT_PUBLIC_CHAIN_ID=57" >> $GITHUB_ENV
echo "NEXT_PUBLIC_BLOCKBOOK_API_URL=https://blockbook.syscoin.org" >> $GITHUB_ENV
elif [ "${{ matrix.network }}" == "testnet" ]; then
echo "NEXT_PUBLIC_NEVM_RPC_URL=https://rpc.tanenbaum.io" >> $GITHUB_ENV
echo "NEXT_PUBLIC_IS_TESTNET=true" >> $GITHUB_ENV
echo "NEXT_PUBLIC_NEVM_EXPLORER_URL=https://tanenbaum.io" >> $GITHUB_ENV
echo "NEXT_PUBLIC_CHAIN_ID=5700" >> $GITHUB_ENV
echo "NEXT_PUBLIC_BLOCKBOOK_API_URL=https://blockbook-dev.syscoin.org" >> $GITHUB_ENV
fi
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/syscoin/syscoin-bridge-${{ matrix.network }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
NEXT_PUBLIC_NEVM_RPC_URL=$NEXT_PUBLIC_NEVM_RPC_URL
NEXT_PUBLIC_IS_TESTNET=$NEXT_PUBLIC_IS_TESTNET
NEXT_PUBLIC_NEVM_EXPLORER_URL=$NEXT_PUBLIC_NEVM_EXPLORER_URL
NEXT_PUBLIC_CHAIN_ID=$NEXT_PUBLIC_CHAIN_ID
NEXT_PUBLIC_BLOCKBOOK_API_URL=$NEXT_PUBLIC_BLOCKBOOK_API_URL
- name: Write metadata
run: "cp $DOCKER_METADATA_OUTPUT_BAKE_FILE metadata.json"
- name: Save metadata
uses: actions/upload-artifact@v4
with:
name: metadata
path: metadata.json