Browse Source

Add weekly build workflow for Docker image deployment

pull/1822/head
maauso 4 months ago
parent
commit
73d102f42e
No known key found for this signature in database GPG Key ID: 4504813B152A7021
  1. 56
      .github/workflows/weekly-build.yaml

56
.github/workflows/weekly-build.yaml

@ -0,0 +1,56 @@
name: Weekly Build
on:
schedule:
# Run at 00:00 on Sundays
- cron: '0 0 * * 0'
workflow_dispatch: # Allows manual execution when needed
jobs:
docker:
name: Build & Deploy Weekly Docker
runs-on: ubuntu-latest
if: github.repository_owner == 'wg-easy'
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
with:
ref: master
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/wg-easy/wg-easy
flavor: |
latest=false
tags: |
type=raw,value=weekly
type=raw,value=weekly-{{date 'YYYY.MM.DD'}}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & Publish Docker Image
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=min
Loading…
Cancel
Save