Skip to content

Merge branch 'main' of github.com:flare-foundation/flare-p-chain-indexer #2

Merge branch 'main' of github.com:flare-foundation/flare-p-chain-indexer

Merge branch 'main' of github.com:flare-foundation/flare-p-chain-indexer #2

name: container-images
on:
workflow_dispatch:
push:
branches: [ "main" ]
tags: [ "v*" ]
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- run: echo "IMAGE_TAG=latest" >> $GITHUB_ENV
if: github.ref_name == 'main'
- run: echo "IMAGE_TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
if: startsWith(github.ref, 'refs/tags/v')
- name: Login to ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push indexer container
uses: docker/[email protected]
with:
context: .
push: true
file: dockerfile.indexer
tags: ghcr.io/${{ github.repository }}/indexer:${{ env.IMAGE_TAG }}
- name: Build and push services container
uses: docker/[email protected]
with:
context: .
push: true
file: dockerfile.services
tags: ghcr.io/${{ github.repository }}/services:${{ env.IMAGE_TAG }}