Compare commits

..

No commits in common. "cf34f14778dd36c796ec3c9a4e7f9410a021528d" and "68c487857debb285b28d7f1524aa6037a7bd318d" have entirely different histories.

8 changed files with 77 additions and 72 deletions

View File

@ -3,7 +3,7 @@ name: Matrix Cron Build
on:
workflow_dispatch:
schedule:
- cron: '0 3 * * 1'
- cron: "0 3 * * 1"
jobs:
tags:
@ -14,11 +14,13 @@ jobs:
run:
working-directory: tags
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun i
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm i
- id: fetcher
run: bun .
run: node .
build:
runs-on: ubuntu-latest
@ -26,7 +28,7 @@ jobs:
strategy:
matrix: ${{fromJson(needs.tags.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
@ -35,12 +37,12 @@ jobs:
install: true
- name: Log in to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to the Container registry
uses: docker/login-action@v3
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
@ -48,7 +50,7 @@ jobs:
- name: Docker Labels
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v4
with:
images: |
cupcakearmy/static
@ -57,7 +59,7 @@ jobs:
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
uses: docker/build-push-action@v2
with:
push: true
platforms: linux/amd64,linux/arm64

View File

@ -1,11 +1,12 @@
# BUILDER
FROM alpine:3 AS builder
FROM alpine AS builder
ARG DEP_DEV="alpine-sdk zlib-dev pcre-dev openssl-dev gd-dev curl"
ARG DEP_DEV="alpine-sdk zlib-dev pcre-dev openssl-dev gd-dev"
RUN apk add --no-cache ${DEP_DEV}
WORKDIR /build
ARG NGINX
ARG NGINX=1.21.6
RUN curl https://nginx.org/download/nginx-${NGINX}.tar.gz | tar xz
RUN mv nginx-${NGINX} nginx
RUN git clone --recursive https://github.com/google/ngx_brotli.git

View File

@ -1,15 +0,0 @@
# tags
To install dependencies:
```bash
bun install
```
To run:
```bash
bun run index.js
```
This project was created using `bun init` in bun v1.1.20. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.

Binary file not shown.

View File

@ -1,4 +1,4 @@
import { info, setOutput, setFailed } from '@actions/core'
import { info, setOutput } from '@actions/core'
import semver from 'semver'
// Fetch the current versions from the download page
@ -9,27 +9,17 @@ const html = await fetch(URL).then((r) => r.text())
const re = /"\/download\/nginx-(\d+\.){3}tar\.gz"/g
const matches = html.match(re)
if (!matches) {
setFailed(`No versions found at ${URL}`)
process.exit(1)
}
// Clean up the matches to semver format
function clean(match: string): string {
function clean(match) {
return match.replace(/"/g, '').replace('/download/nginx-', '').replace('.tar.gz', '')
}
const versions = matches.map(clean)
// Filter
// Get the two most up to date versions, mainline and stable
const [mainline, stable] = versions.sort(semver.rcompare).slice(0, 2)
const filtered = versions.sort(semver.rcompare).slice(0, 2)
if (!mainline || !stable) {
setFailed(`Could not find mainline and stable versions`)
process.exit(1)
}
function convert(version: string, additional: string[] = []) {
function convert(version, additional = []) {
return {
version,
// https://github.com/docker/metadata-action#typeraw
@ -40,7 +30,7 @@ function convert(version: string, additional: string[] = []) {
// Export as github action matrix
// https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
const githubActionMatrix = {
include: [convert(mainline, ['latest', 'mainline']), convert(stable, ['stable'])],
include: [convert(filtered[0], ['latest', 'mainline']), convert(filtered[1], ['stable'])],
}
const serialised = JSON.stringify(githubActionMatrix)

View File

@ -1,16 +1,8 @@
{
"type": "module",
"main": "index.ts",
"dependencies": {
"@actions/core": "^1.10.1",
"semver": "^7.6.3"
},
"main": "index.js",
"devDependencies": {
"@tsconfig/strictest": "^2.0.5",
"@types/bun": "latest",
"@types/semver": "^7.5.8"
},
"peerDependencies": {
"typescript": "^5.5.4"
"@actions/core": "^1.10.0",
"semver": "^7.3.8"
}
}

53
tags/pnpm-lock.yaml generated Normal file
View File

@ -0,0 +1,53 @@
lockfileVersion: 5.4
specifiers:
'@actions/core': ^1.10.0
semver: ^7.3.8
devDependencies:
'@actions/core': 1.10.0
semver: 7.3.8
packages:
/@actions/core/1.10.0:
resolution: {integrity: sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==}
dependencies:
'@actions/http-client': 2.0.1
uuid: 8.3.2
dev: true
/@actions/http-client/2.0.1:
resolution: {integrity: sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==}
dependencies:
tunnel: 0.0.6
dev: true
/lru-cache/6.0.0:
resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==}
engines: {node: '>=10'}
dependencies:
yallist: 4.0.0
dev: true
/semver/7.3.8:
resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==}
engines: {node: '>=10'}
hasBin: true
dependencies:
lru-cache: 6.0.0
dev: true
/tunnel/0.0.6:
resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==}
engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'}
dev: true
/uuid/8.3.2:
resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==}
hasBin: true
dev: true
/yallist/4.0.0:
resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}
dev: true

View File

@ -1,18 +0,0 @@
{
"extends": "@tsconfig/strictest",
"compilerOptions": {
// Enable latest features
"lib": ["ESNext", "DOM"],
"target": "ESNext",
"module": "ESNext",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,
// Bundler mode
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true
}
}