Skip to content

Merge pull request #493 from bitcoin-sv/refactor/bulk-set #174

Merge pull request #493 from bitcoin-sv/refactor/bulk-set

Merge pull request #493 from bitcoin-sv/refactor/bulk-set #174

Workflow file for this run

name: Build and push OCI image to Docker Hub
on:
push:
tags:
- '*'
jobs:
image:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Get build args
id: build_args
run: |
echo "APP_COMMIT=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
echo "APP_VERSION=$(git describe --tags --always --abbrev=0 --match='v[0-9]*.[0-9]*.[0-9]*' 2> /dev/null | sed 's/^.//')" >> "$GITHUB_OUTPUT"
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: "./go.mod"
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: bsvb/arc
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
APP_COMMIT=${{ steps.build_args.outputs.APP_COMMIT }}
APP_VERSION=${{ steps.build_args.outputs.APP_VERSION }}