mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-05 22:05:47 -05:00
67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
name: Docker Refresh
|
|
|
|
# Rebuilds the latest release's image each week so PHP, nginx and Alpine security fixes in the
|
|
# base image reach users without waiting for the next panel release. Scheduled runs use this
|
|
# file from the default branch.
|
|
on:
|
|
schedule:
|
|
- cron: "0 6 * * 1"
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: docker-refresh
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
refresh:
|
|
name: Refresh latest release
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 60
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- name: Resolve latest release
|
|
id: release
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: echo "tag=$(gh release view --repo "$GITHUB_REPOSITORY" --json tagName -q .tagName)" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Code checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: refs/tags/${{ steps.release.outputs.tag }}
|
|
|
|
- name: Update version
|
|
env:
|
|
REF: ${{ steps.release.outputs.tag }}
|
|
run: |
|
|
sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:1}',/" config/app.php
|
|
|
|
- name: Setup QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Setup Docker buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# No cache, so the base image and every apk package are fetched fresh.
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
platforms: linux/amd64,linux/arm64
|
|
pull: true
|
|
no-cache: true
|
|
push: true
|
|
tags: |
|
|
ghcr.io/pterodactyl/panel:latest
|
|
ghcr.io/pterodactyl/panel:${{ steps.release.outputs.tag }}
|