docker-static/.github/workflows/cron.yml

66 lines
1.6 KiB
YAML
Raw Normal View History

2022-11-01 21:09:24 +00:00
name: Matrix Cron Build
2022-11-01 19:29:02 +00:00
on:
workflow_dispatch:
2022-11-01 21:09:24 +00:00
schedule:
2024-07-31 19:10:01 +00:00
- cron: '0 3 * * 1'
2022-11-01 19:29:02 +00:00
jobs:
2022-11-01 19:44:58 +00:00
tags:
runs-on: ubuntu-latest
2022-11-01 19:54:39 +00:00
outputs:
matrix: ${{ steps.fetcher.outputs.matrix }}
2022-11-01 20:07:58 +00:00
defaults:
run:
working-directory: tags
2022-11-01 19:44:58 +00:00
steps:
2024-07-31 19:10:01 +00:00
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun i
2022-11-01 19:54:39 +00:00
- id: fetcher
2024-07-31 19:10:01 +00:00
run: bun .
2022-11-01 19:44:58 +00:00
2022-11-01 19:29:02 +00:00
build:
2022-11-01 19:47:56 +00:00
runs-on: ubuntu-latest
needs: tags
2022-11-01 19:29:02 +00:00
strategy:
2022-11-01 19:52:37 +00:00
matrix: ${{fromJson(needs.tags.outputs.matrix)}}
2022-11-01 19:29:02 +00:00
steps:
2024-07-31 19:10:01 +00:00
- uses: actions/checkout@v4
2022-11-01 19:29:02 +00:00
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
2022-11-01 20:39:50 +00:00
- name: Log in to Docker Hub
2024-07-31 19:10:01 +00:00
uses: docker/login-action@v3
2022-11-01 20:39:50 +00:00
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to the Container registry
2024-07-31 19:10:01 +00:00
uses: docker/login-action@v3
2022-11-01 20:39:50 +00:00
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Labels
id: meta
2024-07-31 19:10:01 +00:00
uses: docker/metadata-action@v5
2022-11-01 20:39:50 +00:00
with:
images: |
2022-11-01 20:52:58 +00:00
cupcakearmy/static
2022-11-01 20:39:50 +00:00
ghcr.io/${{ github.repository }}
tags: ${{ matrix.tags }}
2022-11-01 19:29:02 +00:00
- name: Build and push
id: docker_build
2024-07-31 19:10:01 +00:00
uses: docker/build-push-action@v6
2022-11-01 19:29:02 +00:00
with:
2022-11-01 21:10:13 +00:00
push: true
platforms: linux/amd64,linux/arm64
2022-11-01 19:29:02 +00:00
build-args: NGINX=${{ matrix.version }}
2022-11-01 20:39:50 +00:00
tags: ${{ steps.meta.outputs.tags }}