trigger-build #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |