github.com/Finschia/finschia-sdk@v0.48.1/.github/workflows/docker.yml (about)

     1  name: Build & Push
     2  on:
     3    pull_request:
     4      branches:
     5        - main
     6        - rc*/*
     7    push:
     8      tags:
     9        - "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
    10        - "v[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching v*, i.e. v1.0-rc1, v20.15.10-rc5
    11  env:
    12    registry: docker.io
    13    repository: finschia/finschia-simapp
    14  jobs:
    15    build:
    16      runs-on: ubuntu-latest
    17      steps:
    18        - uses: actions/checkout@v3
    19          with:
    20            fetch-depth: 0
    21        - name: login to the registry
    22          uses: docker/login-action@v2
    23          if: github.event_name != 'pull_request'
    24          with:
    25            registry: ${{env.registry}}
    26            username: ${{secrets.DOCKERHUB_USERNAME}}
    27            password: ${{secrets.DOCKERHUB_TOKEN}}
    28        - name: extract metadata for docker
    29          id: meta
    30          uses: docker/metadata-action@v4
    31          with:
    32            images: ${{env.registry}}/${{env.repository}}
    33            tags: |
    34              type=semver,pattern={{version}}
    35        - name: docker build
    36          uses: docker/build-push-action@v4
    37          with:
    38            push: ${{github.event_name != 'pull_request'}}
    39            build-args: ARCH=x86_64
    40            tags: ${{steps.meta.outputs.tags}}
    41            labels: ${{steps.meta.outputs.labels}}
    42            platforms: linux/amd64