-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a92f94
commit 64552ed
Showing
39 changed files
with
2,313 additions
and
7 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: cron | ||
on: | ||
schedule: | ||
# Run daily | ||
- cron: '0 0 * * *' | ||
workflow_dispatch: | ||
jobs: | ||
update-versions: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
# Admin user must generate a Personal Access Token with 'workflow' permissions, and used to populate the secret named WORKFLOW_TOKEN. | ||
# See: https://stackoverflow.com/questions/68811838/refusing-to-allow-a-personal-access-token-to-create-or-update-workflow | ||
# See: https://stackoverflow.com/questions/66643917/refusing-to-allow-a-github-app-to-create-or-update-workflow | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.WORKFLOW_TOKEN }} # This configures the git repo to use this token | ||
fetch-depth: 0 # Fetch all branches and tags | ||
- shell: pwsh | ||
run: | | ||
./Update-Versions.ps1 -PR -AutoMergeQueue -AutoRelease | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,65 @@ | ||
# Generate-DockerImageVariantsTemplates | ||
|
||
Templates for [Generate-DockerImageVariants](https://github.com/theohbrothers/Generate-DockerImageVariants) repositories. | ||
[![github-actions](https://github.com/theohbrothers/Generate-DockerImageVariantsTemplates/workflows/ci-master-pr/badge.svg)](https://github.com/theohbrothers/Generate-DockerImageVariantsTemplates/actions) | ||
[![github-release](https://img.shields.io/github/v/release/theohbrothers/Generate-DockerImageVariantsTemplates?style=flat-square)](https://github.com/theohbrothers/Generate-DockerImageVariantsTemplates/releases/) | ||
[![docker-image-size](https://img.shields.io/docker/image-size/theohbrothers/Generate-DockerImageVariantsTemplates/latest)](https://hub.docker.com/r/theohbrothers/Generate-DockerImageVariantsTemplates) | ||
|
||
## Usage | ||
Dockerized [webize](https://github.com/theohbrothers/webize) with useful tools. | ||
|
||
```sh | ||
# Vendor all files into current working directory | ||
./vendor.sh --dry-run | ||
## Tags | ||
|
||
# Vendor CI files into current working directory | ||
./vendor.sh ci --dry-run | ||
| Tag | Dockerfile Build Context | | ||
|:-------:|:---------:| | ||
| `:0.8.0`, `:latest` | [View](variants/0.8.0) | | ||
| `:0.8.0-curl` | [View](variants/0.8.0-curl) | | ||
| `:0.7.1` | [View](variants/0.7.1) | | ||
| `:0.7.1-curl` | [View](variants/0.7.1-curl) | | ||
| `:0.6.1` | [View](variants/0.6.1) | | ||
| `:0.6.1-curl` | [View](variants/0.6.1-curl) | | ||
| `:0.5.1` | [View](variants/0.5.1) | | ||
| `:0.5.1-curl` | [View](variants/0.5.1-curl) | | ||
| `:0.4.0` | [View](variants/0.4.0) | | ||
| `:0.4.0-curl` | [View](variants/0.4.0-curl) | | ||
| `:0.3.1` | [View](variants/0.3.1) | | ||
| `:0.3.1-curl` | [View](variants/0.3.1-curl) | | ||
| `:0.2.2` | [View](variants/0.2.2) | | ||
| `:0.2.2-curl` | [View](variants/0.2.2-curl) | | ||
| `:0.1.0` | [View](variants/0.1.0) | | ||
| `:0.1.0-curl` | [View](variants/0.1.0-curl) | | ||
| `:0.0.3` | [View](variants/0.0.3) | | ||
| `:0.0.3-curl` | [View](variants/0.0.3-curl) | | ||
|
||
All variants are based on `alpine`. | ||
|
||
## Development | ||
|
||
Requires Windows `powershell` or [`pwsh`](https://github.com/PowerShell/PowerShell). | ||
|
||
```powershell | ||
# Install Generate-DockerImageVariants module: https://github.com/theohbrothers/Generate-DockerImageVariants | ||
Install-Module -Name Generate-DockerImageVariants -Repository PSGallery -Scope CurrentUser -Force -Verbose | ||
# Edit ./generate templates | ||
# Generate the variants | ||
Generate-DockerImageVariants . | ||
``` | ||
|
||
### Variant versions | ||
|
||
[versions.json](generate/definitions/versions.json) contains a list of [Semver](https://semver.org/) versions, one per line. | ||
|
||
To update versions in `versions.json`: | ||
|
||
```powershell | ||
./Update-Versions.ps1 | ||
``` | ||
|
||
To update versions in `versions.json`, and open a PR for each changed version, and merge successful PRs one after another (to prevent merge conflicts), and finally create a tagged release and close milestone: | ||
|
||
```powershell | ||
$env:GITHUB_TOKEN = 'xxx' | ||
./Update-Versions.ps1 -PR -AutoMergeQueue -AutoRelease | ||
``` | ||
|
||
To perform a dry run, use `-WhatIf`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM alpine:3.15 | ||
ARG TARGETPLATFORM | ||
ARG BUILDPLATFORM | ||
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" | ||
|
||
RUN set -eux; \ | ||
wget -q https://raw.githubusercontent.com/theohbrothers/webize/master/webize -O /usr/local/bin/webize; \ | ||
chmod +x /usr/local/bin/webize | ||
|
||
RUN apk add --no-cache curl | ||
|
||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
RUN chmod +x /docker-entrypoint.sh | ||
|
||
ENTRYPOINT [ "/docker-entrypoint.sh" ] | ||
CMD [ "webize", "--help" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
set -eu | ||
|
||
if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then | ||
set -- webize "$@" | ||
elif [ $# -gt 0 ] && webize "$1" --help > /dev/null 2>&1; then | ||
set -- webize "$@" | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM alpine:3.15 | ||
ARG TARGETPLATFORM | ||
ARG BUILDPLATFORM | ||
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" | ||
|
||
RUN set -eux; \ | ||
wget -q https://raw.githubusercontent.com/theohbrothers/webize/master/webize -O /usr/local/bin/webize; \ | ||
chmod +x /usr/local/bin/webize | ||
|
||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
RUN chmod +x /docker-entrypoint.sh | ||
|
||
ENTRYPOINT [ "/docker-entrypoint.sh" ] | ||
CMD [ "webize", "--help" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
set -eu | ||
|
||
if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then | ||
set -- webize "$@" | ||
elif [ $# -gt 0 ] && webize "$1" --help > /dev/null 2>&1; then | ||
set -- webize "$@" | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM alpine:3.15 | ||
ARG TARGETPLATFORM | ||
ARG BUILDPLATFORM | ||
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" | ||
|
||
RUN set -eux; \ | ||
wget -q https://raw.githubusercontent.com/theohbrothers/webize/master/webize -O /usr/local/bin/webize; \ | ||
chmod +x /usr/local/bin/webize | ||
|
||
RUN apk add --no-cache curl | ||
|
||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
RUN chmod +x /docker-entrypoint.sh | ||
|
||
ENTRYPOINT [ "/docker-entrypoint.sh" ] | ||
CMD [ "webize", "--help" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
set -eu | ||
|
||
if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then | ||
set -- webize "$@" | ||
elif [ $# -gt 0 ] && webize "$1" --help > /dev/null 2>&1; then | ||
set -- webize "$@" | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM alpine:3.15 | ||
ARG TARGETPLATFORM | ||
ARG BUILDPLATFORM | ||
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" | ||
|
||
RUN set -eux; \ | ||
wget -q https://raw.githubusercontent.com/theohbrothers/webize/master/webize -O /usr/local/bin/webize; \ | ||
chmod +x /usr/local/bin/webize | ||
|
||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
RUN chmod +x /docker-entrypoint.sh | ||
|
||
ENTRYPOINT [ "/docker-entrypoint.sh" ] | ||
CMD [ "webize", "--help" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
set -eu | ||
|
||
if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then | ||
set -- webize "$@" | ||
elif [ $# -gt 0 ] && webize "$1" --help > /dev/null 2>&1; then | ||
set -- webize "$@" | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM alpine:3.15 | ||
ARG TARGETPLATFORM | ||
ARG BUILDPLATFORM | ||
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" | ||
|
||
RUN set -eux; \ | ||
wget -q https://raw.githubusercontent.com/theohbrothers/webize/master/webize -O /usr/local/bin/webize; \ | ||
chmod +x /usr/local/bin/webize | ||
|
||
RUN apk add --no-cache curl | ||
|
||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
RUN chmod +x /docker-entrypoint.sh | ||
|
||
ENTRYPOINT [ "/docker-entrypoint.sh" ] | ||
CMD [ "webize", "--help" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
set -eu | ||
|
||
if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then | ||
set -- webize "$@" | ||
elif [ $# -gt 0 ] && webize "$1" --help > /dev/null 2>&1; then | ||
set -- webize "$@" | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM alpine:3.15 | ||
ARG TARGETPLATFORM | ||
ARG BUILDPLATFORM | ||
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" | ||
|
||
RUN set -eux; \ | ||
wget -q https://raw.githubusercontent.com/theohbrothers/webize/master/webize -O /usr/local/bin/webize; \ | ||
chmod +x /usr/local/bin/webize | ||
|
||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
RUN chmod +x /docker-entrypoint.sh | ||
|
||
ENTRYPOINT [ "/docker-entrypoint.sh" ] | ||
CMD [ "webize", "--help" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
set -eu | ||
|
||
if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then | ||
set -- webize "$@" | ||
elif [ $# -gt 0 ] && webize "$1" --help > /dev/null 2>&1; then | ||
set -- webize "$@" | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM alpine:3.15 | ||
ARG TARGETPLATFORM | ||
ARG BUILDPLATFORM | ||
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" | ||
|
||
RUN set -eux; \ | ||
wget -q https://raw.githubusercontent.com/theohbrothers/webize/master/webize -O /usr/local/bin/webize; \ | ||
chmod +x /usr/local/bin/webize | ||
|
||
RUN apk add --no-cache curl | ||
|
||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
RUN chmod +x /docker-entrypoint.sh | ||
|
||
ENTRYPOINT [ "/docker-entrypoint.sh" ] | ||
CMD [ "webize", "--help" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
set -eu | ||
|
||
if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then | ||
set -- webize "$@" | ||
elif [ $# -gt 0 ] && webize "$1" --help > /dev/null 2>&1; then | ||
set -- webize "$@" | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM alpine:3.15 | ||
ARG TARGETPLATFORM | ||
ARG BUILDPLATFORM | ||
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" | ||
|
||
RUN set -eux; \ | ||
wget -q https://raw.githubusercontent.com/theohbrothers/webize/master/webize -O /usr/local/bin/webize; \ | ||
chmod +x /usr/local/bin/webize | ||
|
||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
RUN chmod +x /docker-entrypoint.sh | ||
|
||
ENTRYPOINT [ "/docker-entrypoint.sh" ] | ||
CMD [ "webize", "--help" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
set -eu | ||
|
||
if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then | ||
set -- webize "$@" | ||
elif [ $# -gt 0 ] && webize "$1" --help > /dev/null 2>&1; then | ||
set -- webize "$@" | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM alpine:3.15 | ||
ARG TARGETPLATFORM | ||
ARG BUILDPLATFORM | ||
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" | ||
|
||
RUN set -eux; \ | ||
wget -q https://raw.githubusercontent.com/theohbrothers/webize/master/webize -O /usr/local/bin/webize; \ | ||
chmod +x /usr/local/bin/webize | ||
|
||
RUN apk add --no-cache curl | ||
|
||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
RUN chmod +x /docker-entrypoint.sh | ||
|
||
ENTRYPOINT [ "/docker-entrypoint.sh" ] | ||
CMD [ "webize", "--help" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
set -eu | ||
|
||
if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then | ||
set -- webize "$@" | ||
elif [ $# -gt 0 ] && webize "$1" --help > /dev/null 2>&1; then | ||
set -- webize "$@" | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM alpine:3.15 | ||
ARG TARGETPLATFORM | ||
ARG BUILDPLATFORM | ||
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" | ||
|
||
RUN set -eux; \ | ||
wget -q https://raw.githubusercontent.com/theohbrothers/webize/master/webize -O /usr/local/bin/webize; \ | ||
chmod +x /usr/local/bin/webize | ||
|
||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
RUN chmod +x /docker-entrypoint.sh | ||
|
||
ENTRYPOINT [ "/docker-entrypoint.sh" ] | ||
CMD [ "webize", "--help" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
set -eu | ||
|
||
if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then | ||
set -- webize "$@" | ||
elif [ $# -gt 0 ] && webize "$1" --help > /dev/null 2>&1; then | ||
set -- webize "$@" | ||
fi | ||
|
||
exec "$@" |
Oops, something went wrong.