update doc. (#270) #460
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
name: Building Images | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "scanner-[0-9]+.[0-9]+.[0-9]+" | |
- "explorer-[0-9]+.[0-9]+.[0-9]+" | |
- "temp-server-[0-9]+.[0-9]+.[0-9]+" | |
- "prismer-[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
call-workflow-check: | |
uses: ./.github/workflows/check.yml | |
build-fundation-image: | |
name: Build Fundation Image | |
needs: call-workflow-check | |
concurrency: ci-building-image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login Github Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract Metadata for Docker | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: ghcr.io/FindoraNetwork/findora-scanner | |
tags: | | |
type=raw,value=fundation-{{date 'x'}} | |
type=raw,value=latest | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
platforms: linux/amd64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build-scanner-image: | |
name: Build and Publish Scanner Image | |
needs: build-fundation-image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login Github Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract Metadata for Docker | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: ghcr.io/FindoraNetwork/findora-scanner | |
tags: | | |
type=raw,value={{tag}},enable=${{ startsWith(github.event.ref, 'refs/tags/scanner') }} | |
type=raw,value=scanner-{{branch}}-{{sha}}-{{date 'x'}},enable=${{ !startsWith(github.event.ref, 'refs/tags/scanner') }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./scanner/. | |
push: true | |
platforms: linux/amd64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-explorer-image: | |
name: Build and Publish Explorer Image | |
needs: build-fundation-image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login Github Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract Metadata for Docker | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: ghcr.io/FindoraNetwork/findora-scanner | |
tags: | | |
type=raw,value={{tag}},enable=${{ startsWith(github.event.ref, 'refs/tags/explorer') }} | |
type=raw,value=explorer-{{branch}}-{{sha}}-{{date 'x'}},enable=${{ !startsWith(github.event.ref, 'refs/tags/explorer') }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./explorer/. | |
push: true | |
platforms: linux/amd64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-tempserver-image: | |
name: Build and Publish TempServer Image | |
needs: build-fundation-image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login Github Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract Metadata for Docker | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: ghcr.io/FindoraNetwork/findora-scanner | |
tags: | | |
type=raw,value={{tag}},enable=${{ startsWith(github.event.ref, 'refs/tags/temp-server') }} | |
type=raw,value=temp-server-{{branch}}-{{sha}}-{{date 'x'}},enable=${{ !startsWith(github.event.ref, 'refs/tags/temp-server') }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./temp-server/. | |
push: true | |
platforms: linux/amd64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-prismer-image: | |
name: Build and Publish prismer Image | |
needs: build-fundation-image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login Github Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract Metadata for Docker | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: ghcr.io/FindoraNetwork/findora-scanner | |
tags: | | |
type=raw,value={{tag}},enable=${{ startsWith(github.event.ref, 'refs/tags/prismer') }} | |
type=raw,value=prismer-{{branch}}-{{sha}}-{{date 'x'}},enable=${{ !startsWith(github.event.ref, 'refs/tags/prismer') }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./prismer/. | |
push: true | |
platforms: linux/amd64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |