mirror of
https://github.com/cupcakearmy/docker-static.git
synced 2024-12-21 15:56:30 +00:00
enable cron job
This commit is contained in:
parent
9f7b912536
commit
be1f93b028
@ -1,13 +1,9 @@
|
|||||||
name: trial
|
name: Matrix Cron Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
schedule:
|
||||||
# schedule:
|
- cron: "0 3 * * 1"
|
||||||
# - cron: "0 3 * * 1"
|
|
||||||
# push:
|
|
||||||
# tags:
|
|
||||||
# - "v*.*.*"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tags:
|
tags:
|
||||||
@ -60,7 +56,6 @@ jobs:
|
|||||||
cupcakearmy/static
|
cupcakearmy/static
|
||||||
ghcr.io/${{ github.repository }}
|
ghcr.io/${{ github.repository }}
|
||||||
tags: ${{ matrix.tags }}
|
tags: ${{ matrix.tags }}
|
||||||
# sep-tags: ","
|
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
id: docker_build
|
id: docker_build
|
||||||
@ -71,4 +66,3 @@ jobs:
|
|||||||
push: false
|
push: false
|
||||||
build-args: NGINX=${{ matrix.version }}
|
build-args: NGINX=${{ matrix.version }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
# tags: cupcakearmy/static:${{ matrix.tag }},ghcr.io/${{ github.repository }}:${{ matrix.tag }}
|
|
@ -19,19 +19,18 @@ const versions = matches.map(clean)
|
|||||||
// Get the two most up to date versions, mainline and stable
|
// Get the two most up to date versions, mainline and stable
|
||||||
const filtered = versions.sort(semver.rcompare).slice(0, 2)
|
const filtered = versions.sort(semver.rcompare).slice(0, 2)
|
||||||
|
|
||||||
// Set the tags with a delimiter of ";"
|
|
||||||
function convert(version, additional = []) {
|
function convert(version, additional = []) {
|
||||||
return {
|
return {
|
||||||
version,
|
version,
|
||||||
// https://github.com/docker/metadata-action#typeraw
|
// https://github.com/docker/metadata-action#typeraw
|
||||||
tags: [version, ...additional].join('\n'),
|
tags: [version, ...additional].map((t) => `type=raw,value=${t}`).join('\n'),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Export as github action matrix
|
// Export as github action matrix
|
||||||
// https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
|
// https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
|
||||||
const githubActionMatrix = {
|
const githubActionMatrix = {
|
||||||
include: [convert(versions[0], ['latest', 'mainline']), convert(versions[1], ['stable'])],
|
include: [convert(filtered[0], ['latest', 'mainline']), convert(filtered[1], ['stable'])],
|
||||||
}
|
}
|
||||||
|
|
||||||
const serialised = JSON.stringify(githubActionMatrix)
|
const serialised = JSON.stringify(githubActionMatrix)
|
||||||
|
Loading…
Reference in New Issue
Block a user