Skip to content

Docker

Docker #8

Workflow file for this run

# Workflow for generating and publishing Docker images
name: Docker
on:
workflow_dispatch:
push:
branches:
- 'master'
tags:
- '*'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
swiftbitcoin/swift-bitcoin
ghcr.io/swift-bitcoin/swift-bitcoin
tags: |
type=sha,prefix=__tool__-sha-
type=semver,pattern={{version}},prefix=__tool__-
type=semver,pattern={{major}}.{{minor}},prefix=__tool__-
-
name: Build
uses: docker/bake-action@v5
with:
files: |
./tools/docker-bake.hcl
${{ steps.meta.outputs.bake-file }}
push: true