Skip to content

Commit 49430b3

Browse files
committed
Update docker.yml
1 parent 104526a commit 49430b3

1 file changed

Lines changed: 47 additions & 45 deletions

File tree

.github/workflows/docker.yml

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: Release 3X-UI for Docker
2+
23
permissions:
34
contents: read
45
packages: write
6+
57
on:
68
workflow_dispatch:
79
push:
@@ -13,48 +15,48 @@ jobs:
1315
runs-on: ubuntu-latest
1416

1517
steps:
16-
- uses: actions/checkout@v5
17-
with:
18-
submodules: true
19-
20-
- name: Docker meta
21-
id: meta
22-
uses: docker/metadata-action@v5
23-
with:
24-
images: |
25-
hsanaeii/3x-ui
26-
ghcr.io/mhsanaei/3x-ui
27-
tags: |
28-
type=ref,event=branch
29-
type=ref,event=tag
30-
type=pep440,pattern={{version}}
31-
32-
- name: Set up QEMU
33-
uses: docker/setup-qemu-action@v3
34-
35-
- name: Set up Docker Buildx
36-
uses: docker/setup-buildx-action@v3
37-
with:
38-
install: true
39-
40-
- name: Login to Docker Hub
41-
uses: docker/login-action@v3
42-
with:
43-
username: ${{ secrets.DOCKER_HUB_USERNAME }}
44-
password: ${{ secrets.DOCKER_HUB_TOKEN }}
45-
46-
- name: Login to GHCR
47-
uses: docker/login-action@v3
48-
with:
49-
registry: ghcr.io
50-
username: ${{ github.repository_owner }}
51-
password: ${{ secrets.GITHUB_TOKEN }}
52-
53-
- name: Build and push Docker image
54-
uses: docker/build-push-action@v6
55-
with:
56-
context: .
57-
push: true
58-
platforms: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/arm/v6, linux/386
59-
tags: ${{ steps.meta.outputs.tags }}
60-
labels: ${{ steps.meta.outputs.labels }}
18+
- uses: actions/checkout@v5
19+
with:
20+
submodules: true
21+
22+
- name: Docker meta
23+
id: meta
24+
uses: docker/metadata-action@v5
25+
with:
26+
images: |
27+
hsanaeii/3x-ui
28+
ghcr.io/mhsanaei/3x-ui
29+
tags: |
30+
type=ref,event=branch
31+
type=ref,event=tag
32+
type=semver,pattern={{version}}
33+
34+
- name: Set up QEMU
35+
uses: docker/setup-qemu-action@v3
36+
37+
- name: Set up Docker Buildx
38+
uses: docker/setup-buildx-action@v3
39+
with:
40+
install: true
41+
42+
- name: Login to Docker Hub
43+
uses: docker/login-action@v3
44+
with:
45+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
46+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
47+
48+
- name: Login to GHCR
49+
uses: docker/login-action@v3
50+
with:
51+
registry: ghcr.io
52+
username: ${{ github.actor }}
53+
password: ${{ secrets.GITHUB_TOKEN }}
54+
55+
- name: Build and push Docker image
56+
uses: docker/build-push-action@v6
57+
with:
58+
context: .
59+
push: true
60+
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/arm/v6,linux/386
61+
tags: ${{ steps.meta.outputs.tags }}
62+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)