mirror of
https://github.com/cupcakearmy/docker-static.git
synced 2024-12-22 00:06:31 +00:00
66 lines
1.6 KiB
YAML
66 lines
1.6 KiB
YAML
name: Matrix Cron Build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 3 * * 1'
|
|
|
|
jobs:
|
|
tags:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.fetcher.outputs.matrix }}
|
|
defaults:
|
|
run:
|
|
working-directory: tags
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: oven-sh/setup-bun@v2
|
|
- run: bun i
|
|
- id: fetcher
|
|
run: bun .
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
needs: tags
|
|
strategy:
|
|
matrix: ${{fromJson(needs.tags.outputs.matrix)}}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
with:
|
|
install: true
|
|
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Docker Labels
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: |
|
|
cupcakearmy/static
|
|
ghcr.io/${{ github.repository }}
|
|
tags: ${{ matrix.tags }}
|
|
|
|
- name: Build and push
|
|
id: docker_build
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
push: true
|
|
platforms: linux/amd64,linux/arm64
|
|
build-args: NGINX=${{ matrix.version }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|