From 73d102f42e4a6b8cbc0682c8f58475b83c3d450e Mon Sep 17 00:00:00 2001 From: maauso Date: Fri, 18 Apr 2025 17:36:34 +0000 Subject: [PATCH] Add weekly build workflow for Docker image deployment --- .github/workflows/weekly-build.yaml | 56 +++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/weekly-build.yaml diff --git a/.github/workflows/weekly-build.yaml b/.github/workflows/weekly-build.yaml new file mode 100644 index 00000000..01e8e2ba --- /dev/null +++ b/.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