Skip to content

Commit 182a861

Browse files
committed
Replace existing worflow with publish-on-tag
1 parent b80f59a commit 182a861

File tree

2 files changed

+42
-65
lines changed

2 files changed

+42
-65
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 65 deletions
This file was deleted.

.github/workflows/publish-on-tag.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Publish Docker image on tag
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
push_to_dockerhub:
10+
name: Push Docker image to Docker Hub
11+
runs-on: ubuntu-22.04
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Extract metadata
17+
id: meta
18+
run: |
19+
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
20+
echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
21+
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v3
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v3
27+
28+
- name: Login to Docker Hub
29+
uses: docker/login-action@v3
30+
with:
31+
username: ${{ secrets.DOCKERHUB_USERNAME }}
32+
password: ${{ secrets.DOCKERHUB_TOKEN }}
33+
34+
- name: Build and push
35+
uses: docker/build-push-action@v6
36+
with:
37+
context: .
38+
platforms: linux/amd64,linux/arm64
39+
push: true
40+
tags: getumbrel/bitcoind:${{ steps.meta.outputs.TAG }}
41+
build-args: |
42+
VERSION=${{ steps.meta.outputs.VERSION }}

0 commit comments

Comments
 (0)