mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-01 03:45:53 -05:00
67 lines
2.1 KiB
YAML
67 lines
2.1 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
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@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
|
|
|
|
- name: Setup Docker buildx
|
|
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
|
|
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0
|
|
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@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
|
|
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 }}
|