Skip to content

Commit 8914e7b

Browse files
author
Michael Schroder
committed
Added automated docker image build and push upon tagged version
1 parent 8e9ab96 commit 8914e7b

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/docker.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: "ci/gh-actions/docker-image"
2+
3+
on:
4+
push:
5+
tags: [ 'release-v*.*' ]
6+
7+
jobs:
8+
docker_buildx_debian:
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 45
11+
steps:
12+
- name: configure git
13+
run: git config --global --add safe.directory '*'
14+
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0 # Needed for tags
18+
submodules: recursive
19+
20+
- name: Login to Docker Hub
21+
uses: docker/login-action@v3
22+
with:
23+
username: ${{ vars.DOCKERHUB_USERNAME }}
24+
password: ${{ secrets.DOCKERHUB_TOKEN }}
25+
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
32+
- name: Extract Version
33+
run: |
34+
export MONERO_VERSION="$(git describe --tags)"
35+
echo "MONERO_VERSION=$MONERO_VERSION" >> $GITHUB_ENV
36+
37+
- name: Build and push latest Debian image
38+
uses: docker/[email protected]
39+
with:
40+
context: ./
41+
file: ./Dockerfile
42+
platforms: |
43+
linux/amd64
44+
push: ${{ github.event_name != 'pull_request' }}
45+
tags: |
46+
${{ vars.DOCKERHUB_USERNAME }}/monero:latest
47+
${{ vars.DOCKERHUB_USERNAME }}/monero:${{ env.MONERO_VERSION }}
48+

0 commit comments

Comments
 (0)