Skip to content

Commit 6dfa9b9

Browse files
committed
update github action
1 parent a93668d commit 6dfa9b9

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

.github/workflows/manual_build.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Manual Build DockerHub Image
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
logLevel:
7+
description: 'Log level'
8+
required: true
9+
default: 'warning'
10+
type: choice
11+
options:
12+
- info
13+
- warning
14+
- debug
15+
tags:
16+
description: 'Test scenario tags'
17+
required: false
18+
type: boolean
19+
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v3
27+
28+
- name: Docker meta
29+
id: meta
30+
uses: docker/metadata-action@v4
31+
with:
32+
images: answerdev/answer
33+
tags: |
34+
type=ref,enable=true,priority=600,prefix=,suffix=,event=branch
35+
type=semver,pattern={{version}}
36+
37+
- name: Set up QEMU
38+
uses: docker/setup-qemu-action@v2
39+
40+
- name: Set up Docker Buildx
41+
uses: docker/setup-buildx-action@v2
42+
43+
- name: Login to DockerHub
44+
uses: docker/login-action@v2
45+
with:
46+
username: ${{ secrets.DOCKER_USERNAME }}
47+
password: ${{ secrets.DOCKER_PASSWORD }}
48+
49+
# - name: Login to GitHub Container Registry
50+
# uses: docker/login-action@v2
51+
# with:
52+
# registry: ghcr.io
53+
# username: ${{ github.actor }}
54+
# password: ${{ secrets.GITHUB_TOKEN }}
55+
56+
- name: Build and push
57+
uses: docker/build-push-action@v4
58+
with:
59+
context: .
60+
platforms: linux/amd64,linux/arm64
61+
push: true
62+
file: ./.github/Dockerfile
63+
tags: ${{ steps.meta.outputs.tags }}
64+
labels: ${{ steps.meta.outputs.labels }}
65+
66+

0 commit comments

Comments
 (0)