Skip to content

Commit e7a4ed3

Browse files
committed
feat: enhance Docker release workflow with metadata extraction and description update
1 parent 9a63a2e commit e7a4ed3

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,53 @@ permissions:
99
contents: write
1010

1111
jobs:
12+
docker:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Set up QEMU
19+
uses: docker/setup-qemu-action@v3
20+
21+
- name: Set up Docker Buildx
22+
uses: docker/setup-buildx-action@v3
23+
24+
- name: Log in to Docker Hub
25+
uses: docker/login-action@v3
26+
with:
27+
username: ${{ secrets.DOCKERHUB_USERNAME }}
28+
password: ${{ secrets.DOCKERHUB_TOKEN }}
29+
30+
- name: Extract metadata
31+
id: meta
32+
uses: docker/metadata-action@v5
33+
with:
34+
images: hightemp/https_proxy
35+
tags: |
36+
type=semver,pattern={{version}}
37+
type=semver,pattern={{major}}.{{minor}}
38+
type=semver,pattern={{major}}
39+
type=raw,value=latest
40+
41+
- name: Build and push
42+
uses: docker/build-push-action@v6
43+
with:
44+
context: .
45+
platforms: linux/amd64,linux/arm64
46+
push: true
47+
tags: ${{ steps.meta.outputs.tags }}
48+
labels: ${{ steps.meta.outputs.labels }}
49+
cache-from: type=gha
50+
cache-to: type=gha,mode=max
51+
52+
- name: Update Docker Hub description
53+
uses: peter-evans/dockerhub-description@v4
54+
with:
55+
username: ${{ secrets.DOCKERHUB_USERNAME }}
56+
password: ${{ secrets.DOCKERHUB_TOKEN }}
57+
repository: hightemp/https_proxy
58+
1259
release:
1360
runs-on: ubuntu-latest
1461
steps:

0 commit comments

Comments
 (0)