-
-
Notifications
You must be signed in to change notification settings - Fork 79
49 lines (43 loc) · 1.17 KB
/
Copy pathbuild.yml
File metadata and controls
49 lines (43 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Build docker image
name: Build
on:
release:
types: [published]
workflow_dispatch:
inputs:
repository:
description: Repository
ref:
description: Ref
tag:
description: Tag
required: true
default: faforever/faf-python-server:latest
jobs:
docker-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: faforever/faf-python-server
tags:
type=semver,pattern={{raw}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and publish docker image
uses: docker/build-push-action@v6
with:
build-args: GITHUB_REF=${{ github.ref_name }}
tags: ${{ inputs.tag || steps.meta.outputs.tags }}
push: true