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

66 lines
1.6 KiB
YAML
Raw Normal View History

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