@@ -4,22 +4,46 @@ name: Build
44on :
55 release :
66 types : [published]
7+ workflow_dispatch :
8+ inputs :
9+ repository :
10+ description : Repository
11+ ref :
12+ description : Ref
13+ tag :
14+ description : Tag
15+ required : true
16+ default : faforever/faf-python-server:latest
717
818jobs :
919 docker-image :
1020 runs-on : ubuntu-latest
1121 steps :
12- - uses : actions/checkout@v3
22+ - uses : actions/checkout@v4
23+ with :
24+ repository : ${{ inputs.repository }}
25+ ref : ${{ inputs.ref }}
26+
27+ - name : Docker meta
28+ id : meta
29+ uses : docker/metadata-action@v5
30+ with :
31+ images : faforever/faf-python-server
32+ tags :
33+ type=semver,pattern={{raw}}
1334
14- - name : Extract tag name
15- id : vars
16- run : echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
35+ - name : Set up Docker Buildx
36+ uses : docker/setup-buildx-action@v3
1737
18- - name : Build and publish docker image
19- uses : docker/build-push- action@v1.1.1
38+ - name : Login to Docker Hub
39+ uses : docker/login- action@v3
2040 with :
21- repository : faforever/faf-python-server
2241 username : ${{ secrets.DOCKER_USERNAME }}
2342 password : ${{ secrets.DOCKER_PASSWORD }}
24- build_args : GITHUB_REF=${{ steps.vars.outputs.tag }}
25- tag_with_ref : true
43+
44+ - name : Build and publish docker image
45+ uses : docker/build-push-action@v6
46+ with :
47+ build-args : GITHUB_REF=${{ github.ref_name }}
48+ tags : ${{ inputs.tag || steps.meta.outputs.tags }}
49+ push : true
0 commit comments