mirror of
https://github.com/cupcakearmy/docker-static.git
synced 2024-12-22 16:26:30 +00:00
Compare commits
2 Commits
68c487857d
...
cf34f14778
Author | SHA1 | Date | |
---|---|---|---|
cf34f14778 | |||
a033f712a1 |
22
.github/workflows/cron.yml
vendored
22
.github/workflows/cron.yml
vendored
@ -3,7 +3,7 @@ name: Matrix Cron Build
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 3 * * 1"
|
||||
- cron: '0 3 * * 1'
|
||||
|
||||
jobs:
|
||||
tags:
|
||||
@ -14,13 +14,11 @@ jobs:
|
||||
run:
|
||||
working-directory: tags
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
- run: npm i
|
||||
- uses: actions/checkout@v4
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun i
|
||||
- id: fetcher
|
||||
run: node .
|
||||
run: bun .
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@ -28,7 +26,7 @@ jobs:
|
||||
strategy:
|
||||
matrix: ${{fromJson(needs.tags.outputs.matrix)}}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
@ -37,12 +35,12 @@ jobs:
|
||||
install: true
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
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@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
@ -50,7 +48,7 @@ jobs:
|
||||
|
||||
- name: Docker Labels
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
cupcakearmy/static
|
||||
@ -59,7 +57,7 @@ jobs:
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
@ -1,12 +1,11 @@
|
||||
# BUILDER
|
||||
FROM alpine AS builder
|
||||
FROM alpine:3 AS builder
|
||||
|
||||
ARG DEP_DEV="alpine-sdk zlib-dev pcre-dev openssl-dev gd-dev"
|
||||
ARG DEP_DEV="alpine-sdk zlib-dev pcre-dev openssl-dev gd-dev curl"
|
||||
RUN apk add --no-cache ${DEP_DEV}
|
||||
|
||||
|
||||
WORKDIR /build
|
||||
ARG NGINX=1.21.6
|
||||
ARG NGINX
|
||||
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
|
||||
|
15
tags/README.md
Normal file
15
tags/README.md
Normal file
@ -0,0 +1,15 @@
|
||||
# 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.
|
BIN
tags/bun.lockb
Executable file
BIN
tags/bun.lockb
Executable file
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
import { info, setOutput } from '@actions/core'
|
||||
import { info, setOutput, setFailed } from '@actions/core'
|
||||
import semver from 'semver'
|
||||
|
||||
// Fetch the current versions from the download page
|
||||
@ -9,17 +9,27 @@ 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) {
|
||||
function clean(match: string): string {
|
||||
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 filtered = versions.sort(semver.rcompare).slice(0, 2)
|
||||
const [mainline, stable] = versions.sort(semver.rcompare).slice(0, 2)
|
||||
|
||||
function convert(version, additional = []) {
|
||||
if (!mainline || !stable) {
|
||||
setFailed(`Could not find mainline and stable versions`)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
function convert(version: string, additional: string[] = []) {
|
||||
return {
|
||||
version,
|
||||
// https://github.com/docker/metadata-action#typeraw
|
||||
@ -30,7 +40,7 @@ function convert(version, additional = []) {
|
||||
// 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(filtered[0], ['latest', 'mainline']), convert(filtered[1], ['stable'])],
|
||||
include: [convert(mainline, ['latest', 'mainline']), convert(stable, ['stable'])],
|
||||
}
|
||||
|
||||
const serialised = JSON.stringify(githubActionMatrix)
|
@ -1,8 +1,16 @@
|
||||
{
|
||||
"type": "module",
|
||||
"main": "index.js",
|
||||
"main": "index.ts",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.1",
|
||||
"semver": "^7.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@actions/core": "^1.10.0",
|
||||
"semver": "^7.3.8"
|
||||
"@tsconfig/strictest": "^2.0.5",
|
||||
"@types/bun": "latest",
|
||||
"@types/semver": "^7.5.8"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "^5.5.4"
|
||||
}
|
||||
}
|
||||
|
53
tags/pnpm-lock.yaml
generated
53
tags/pnpm-lock.yaml
generated
@ -1,53 +0,0 @@
|
||||
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
|
18
tags/tsconfig.json
Normal file
18
tags/tsconfig.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user