-
Notifications
You must be signed in to change notification settings - Fork 7
61 lines (50 loc) · 1.47 KB
/
release.yml
File metadata and controls
61 lines (50 loc) · 1.47 KB
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
56
57
58
59
60
61
name: Release
on:
repository_dispatch:
types: [trigger-build]
jobs:
build-and-push:
name: Build and push multi-platform images
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get tag from dispatch payload
run: |
echo "TAG=${{ github.event.client_payload.tag }}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Run server download script
run: |
chmod +x ./script/server.sh
./script/server.sh
- name: List files after download
run: ls -la .
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push multi-platform image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: |
ppanel/ppanel:${{ env.TAG }}
ppanel/ppanel:latest
- name: Image push info
run: |
echo "Pushed images:"
echo " ppanel/ppanel:${{ env.TAG }}"
echo " ppanel/ppanel:latest"