Skip to content

Commit b583a92

Browse files
committed
add manual build
1 parent 84138dd commit b583a92

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

.github/workflows/push.yml

+19-4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
schedule:
77
- cron: 0 0 1 * *
88
workflow_dispatch:
9+
inputs:
10+
dockerfile:
11+
description: 'Docker file to build'
12+
default: ''
13+
type: string
914

1015
jobs:
1116

@@ -14,16 +19,17 @@ jobs:
1419
runs-on: ubuntu-latest
1520

1621
steps:
17-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
1823

1924
- name: Log in to Docker Hub
20-
uses: docker/login-action@v1
25+
uses: docker/login-action@v3
2126
with:
2227
username: ${{ secrets.DOCKER_USERNAME }}
2328
password: ${{ secrets.DOCKER_PASSWORD }}
2429

2530
- name: Push debian image
26-
uses: docker/build-push-action@v2
31+
if: ${{ github.event_name != 'workflow_dispatch' }}
32+
uses: docker/build-push-action@v6
2733
with:
2834
push: true
2935
tags: |
@@ -32,8 +38,17 @@ jobs:
3238
file: debian.Dockerfile
3339

3440
- name: Push debian-x64-root image
35-
uses: docker/build-push-action@v2
41+
if: ${{ github.event_name != 'workflow_dispatch' }}
42+
uses: docker/build-push-action@v6
3643
with:
3744
push: true
3845
tags: ceifa/garrysmod:debian-x64-root
3946
file: debian-x64-root.Dockerfile
47+
48+
- name: Push manual image
49+
if: ${{ github.event_name == 'workflow_dispatch' }}
50+
uses: docker/build-push-action@v6
51+
with:
52+
push: true
53+
tags: ceifa/garrysmod:${{ github.event.inputs.dockerfile }}
54+
file: ${{ github.event.inputs.dockerfile }}.Dockerfile

0 commit comments

Comments
 (0)