mirror of
https://github.com/dockersrc/go
synced 2026-06-24 14:01:08 -04:00
b646f7a726
Sync project with updated upstream template files while preserving all
Go-specific customizations (EXEC_CMD_BIN='', DATA_DIR='', Go env vars,
/data/go symlink, Go-named dirs, etc.).
- .env.scripts: bump version stamp to 202605292219-git
- .gitattributes: update date stamp from template
- .gitea/workflows/docker.yaml: replace bare echo with printf %q for
GITHUB_OUTPUT assignments; use local var assignments for docker org/tag
- .gitignore: expand with editor configs (VSCode/JetBrains/Vim), AI tool
configs (Claude/.cursor/Copilot), env/secrets, build artifacts,
dependency dirs, logs, test/coverage dirs from updated template
- Dockerfile: bump BUILD_DATE to 202605292219; fix PHP_FPM detection from
ls subshell to set -- glob pattern; fix systemd cleanup to use for loop
instead of rm -f $(ls | grep -v ...)
- rootfs/root/docker/setup/00-init.sh through 07-cleanup.sh: update
version/date stamps to 202605292220-git template versions
- rootfs/usr/local/bin/entrypoint.sh: update stamp; fix echo quoting to
use double quotes for CONTAINER_NAME expansion
- rootfs/usr/local/etc/docker/init.d/00-go.sh: apply template improvements:
split SIGPWR trap onto separate line with 2>/dev/null || true; expand
debugger setup to multi-line if/else; use $(<file) instead of cat for
old_pid; apply _script_hash invalidation (W14) before START_SCRIPT
generation; replace heredoc/eval approach with printf %q for safe
quoting; launch START_SCRIPT with bash not eval sh -c (W15); add null
guard on chown in __run_secure_function; use _resolved temp var pattern
for type -P resolution (remove SERVICE_PID_NUMBER); explicit
[ "$1" = "check" ] guard on __check_service; errorCode=${PIPESTATUS[0]};
fix command -v pre check; add grep -- separator; fix ps|awk|grep chain
to pure awk; remove duplicate mkdir block
- rootfs/usr/local/share/template-files/config/env/default.sample:
ENTRYPOINT_PID_FILE path /run/.entrypoint.pid → /run/init.d/entrypoint.pid
- rootfs/usr/local/share/template-files/config/env/examples/zz-entrypoint.sh:
same ENTRYPOINT_PID_FILE path fix
Dockerfile
.env.scripts
.gitattributes
.gitea/workflows/docker.yaml
.gitignore
rootfs/root/docker/setup/00-init.sh
rootfs/root/docker/setup/01-system.sh
rootfs/root/docker/setup/02-packages.sh
rootfs/root/docker/setup/03-files.sh
rootfs/root/docker/setup/04-users.sh
rootfs/root/docker/setup/05-custom.sh
rootfs/root/docker/setup/06-post.sh
rootfs/root/docker/setup/07-cleanup.sh
rootfs/usr/local/bin/entrypoint.sh
rootfs/usr/local/etc/docker/init.d/00-go.sh
rootfs/usr/local/share/template-files/config/env/default.sample
rootfs/usr/local/share/template-files/config/env/examples/zz-entrypoint.sh
68 lines
2.4 KiB
YAML
68 lines
2.4 KiB
YAML
name: go
|
|
|
|
on: push
|
|
|
|
jobs:
|
|
release-go:
|
|
runs-on: act_runner
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
env:
|
|
RUNNER_TOOL_CACHE: /toolcache
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
- name: Get Meta
|
|
id: meta
|
|
run: |
|
|
repo_version="$(git describe --tags --always)"
|
|
repo_version="${repo_version#v}"
|
|
docker_org="${GITHUB_REPOSITORY%%/*}"
|
|
repo_name="${GITHUB_REPOSITORY#*/}"
|
|
repo_name="${repo_name#docker-}"
|
|
docker_tag="${DOCKER_TAG:-latest}"
|
|
docker_hub="${DOCKER_HUB:-docker.io}"
|
|
printf 'DATE_TAG=%s\n' "$(date +'%y%m')" >> "$GITHUB_OUTPUT"
|
|
printf 'REPO_VERSION=%s\n' "$repo_version" >> "$GITHUB_OUTPUT"
|
|
printf 'DOCKER_ORG=%s\n' "$docker_org" >> "$GITHUB_OUTPUT"
|
|
printf 'DOCKER_TAG=%s\n' "$docker_tag" >> "$GITHUB_OUTPUT"
|
|
printf 'DOCKER_HUB=%s\n' "$docker_hub" >> "$GITHUB_OUTPUT"
|
|
printf 'REPO_NAME=%s\n' "$repo_name" >> "$GITHUB_OUTPUT"
|
|
printf '%s\n' "$docker_hub/$docker_org/$repo_name:$docker_tag"
|
|
|
|
- name: Set up Docker BuildX
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
password: ${{ secrets.DOCKER_TOKEN }}
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
registry: ${{ steps.meta.outputs.DOCKER_HUB }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
platforms: |
|
|
linux/amd64
|
|
linux/arm64
|
|
push: true
|
|
build-args: |
|
|
IMAGE_NAME=${{ steps.meta.outputs.REPO_NAME }}
|
|
BUILD_DATE=$(date -u +'%Y%m%d%H%M')
|
|
BUILD_VERSION=$(date -u +'%Y%m%d%H%M')
|
|
GIT_COMMIT=${{ github.sha }}
|
|
TIMEZONE=America/New_York
|
|
LANGUAGE=en_US.UTF-8
|
|
LICENSE=WTFPL
|
|
TZ=America/New_York
|
|
tags: |
|
|
${{ steps.meta.outputs.DOCKER_HUB }}/${{ steps.meta.outputs.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.DATE_TAG }}
|
|
${{ steps.meta.outputs.DOCKER_HUB }}/${{ steps.meta.outputs.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.DOCKER_TAG }}
|