Skip to content

Commit c413d31

Browse files
committed
update docker build
1 parent c6eb7cc commit c413d31

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed
Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,51 @@
11
name: Docker build (version + latest)
2+
23
on:
3-
push: { tags: 'v[0-9]+.[0-9]+.[0-9]+' }
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: Tag to build
8+
required: true
9+
default: '0.6.3'
10+
11+
push:
12+
tags:
13+
- 'v[0-9]+.[0-9]+.[0-9]+'
414

515
jobs:
616
docker:
717
runs-on: ubuntu-latest
18+
819
steps:
920
- name: Checkout
1021
uses: actions/checkout@v4
22+
1123
- name: Extract tag
12-
run: echo "TAG=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
24+
if: github.event_name == 'push'
25+
run: echo "TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
26+
27+
- name: Set tag from input
28+
if: github.event_name == 'workflow_dispatch'
29+
run: echo "TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
30+
1331
- name: Set up QEMU
1432
uses: docker/setup-qemu-action@v3
33+
1534
- name: Set up Docker Buildx
1635
uses: docker/setup-buildx-action@v3
36+
1737
- name: Login to Docker Hub
1838
uses: docker/login-action@v3
1939
with:
2040
username: ${{ secrets.DOCKERHUB_USERNAME }}
2141
password: ${{ secrets.DOCKERHUB_TOKEN }}
42+
2243
- name: Build and push
23-
uses: docker/build-push-action@v5
44+
uses: docker/build-push-action@v6
2445
with:
2546
context: .
2647
platforms: linux/amd64,linux/arm64
2748
push: true
28-
tags: dannyben/completely,dannyben/completely:${{ env.TAG }}
49+
tags: |
50+
dannyben/completely
51+
dannyben/completely:${{ env.TAG }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM dannyben/alpine-ruby
1+
FROM dannyben/alpine-ruby:3.3.3
22

33
ENV PS1 "\n\n>> completely \W \$ "
44
WORKDIR /app

0 commit comments

Comments
 (0)