Skip to content

Implement internal and external APIs. #128

Implement internal and external APIs.

Implement internal and external APIs. #128

Workflow file for this run

name: docker-ci
on:
push:
branches:
- 'main'
tags:
- 'acceptxmr-server-v*.*.*'
pull_request:
branches:
- '*'
env:
RELEASE: |
${{
github.event.pull_request.merged == true ||
github.ref_name == 'main' ||
github.ref_type == 'tag'
}}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
busyboredom/acceptxmr
tags: |
type=match,pattern=acceptxmr-server-v(\d.\d.\d),group=1
type=match,pattern=acceptxmr-server-v(\d.\d),group=1
type=match,pattern=acceptxmr-server-v(\d),group=1
type=sha
- name: Login to DockerHub
if: ${{ env.RELEASE }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ env.RELEASE }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max