46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
name: Build
|
|
run-name: Build Docker Image
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- name: Install docker
|
|
uses: papodaca/install-docker-action@main
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Login into Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: https://git.prettyhefty.com
|
|
username: ${{ gitea.repository_owner }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Prepare Meta
|
|
id: prepare
|
|
run: |
|
|
BITCOIN_VERSION=24.2
|
|
PLATFORM="linux/amd64"
|
|
REPO=${{ gitea.repository }}
|
|
|
|
echo ::set-output name=build_date::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
|
echo ::set-output name=docker_platform::${PLATFORM}
|
|
echo ::set-output name=repository::${REPO,,}
|
|
echo ::set-output name=version::${BITCOIN_VERSION}
|
|
|
|
- name: Build Docker image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
platforms: ${{ steps.prepare.outputs.docker_platform }}
|
|
push: true
|
|
tags: git.prettyhefty.com/${{ steps.prepare.outputs.repository }}:${{ steps.prepare.outputs.version }} |