Skip to content

Commit f677b5d

Browse files
committed
battle git + wget
1 parent 4cc3c60 commit f677b5d

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/docker.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: docker
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- 'main'
8+
tags:
9+
- 'v*'
10+
paths:
11+
- ".github/workflows/docker.yml"
12+
- "Dockerfile"
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 200
18+
19+
steps:
20+
-
21+
name: Checkout
22+
uses: actions/checkout@v4
23+
-
24+
name: Set up QEMU
25+
uses: docker/setup-qemu-action@v3
26+
-
27+
name: Login to Docker Hub
28+
uses: docker/login-action@v3
29+
with:
30+
username: ${{ secrets.DOCKER_USERNAME }}
31+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
32+
-
33+
name: Docker meta
34+
id: meta
35+
uses: docker/metadata-action@v5
36+
with:
37+
images: ${{ secrets.DOCKER_USERNAME }}/alpine_git_wget
38+
tags: |
39+
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
40+
type=semver,pattern={{version}}
41+
-
42+
name: Set up Docker Buildx
43+
uses: docker/setup-buildx-action@v3
44+
-
45+
name: Build and push
46+
uses: docker/build-push-action@v6
47+
with:
48+
context: .
49+
shm-size: 2g
50+
file: ./Dockerfile
51+
platforms: linux/amd64,linux/arm64
52+
push: true
53+
tags: ${{ env.DOCKER_METADATA_OUTPUT_TAGS }}

0 commit comments

Comments
 (0)