-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (49 loc) · 1.51 KB
/
build-docker-image.yml
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
50
51
52
53
54
55
name: Build Docker Image
run-name: Build ${{ inputs.branch }} - ${{ inputs.user }}
on:
workflow_dispatch:
inputs:
repository:
description: 'GitHub repository to create image off.'
required: true
default: 'GIScience/ors-config-migration'
branch:
description: 'GitHub branch to create image off.'
required: true
default: 'main'
tag:
description: 'Name of the docker tag to create.'
required: true
default: 'latest'
user:
description: ''
required: false
default: 'chore'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ inputs.repository || 'GIScience/ors-config-migration' }}
ref: ${{ inputs.branch || 'main' }}
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/[email protected]
with:
context: .
platforms: linux/amd64,linux/arm64/v8
provenance: false
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: heigit/ors-config-migration:${{ inputs.tag || 'latest' }}