Merge tag 'v1.4.15' into release/bsc-1.x-fh2.5 #258
Workflow file for this run
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: Build docker image | |
on: | |
push: | |
branches: | |
# Expected to be <network>/{fix,feature}/<name> where <network> is one of {geth,bsc,polygon,etc.} | |
- "*/fix/*" | |
- "*/feature/*" | |
tags: | |
- "[a-z0-9]+-v*" | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build-and-push-image: | |
runs-on: ubuntu-20.04 | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Generate docker tags/labels from github build context | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
# We tag latest only release of the form <variant>-v<major>.<minor>.<patch>-fh2.1 so "rc/beta" version are not flagged as latest | |
# - 2 docker tags: `{geth|bsc|...}-latest` and `{git-tag}` | |
tags: | | |
type=ref,event=tag,priority=1000 | |
type=ref,event=branch,priority=1000 | |
type=match,pattern=^(.*)-v\d+.\d+.\d+-fh,group=1,suffix=-latest-fh2 | |
flavor: | | |
latest=false | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
# org.opencontainers.image.version will match the tag name | |
labels: ${{ steps.meta.outputs.labels }} |