Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
paths:
.github/workflows/**/*.{yml,yaml}:
ignore:
- '"inputs" section is alias node but mapping node is expected'
- '"paths" section must be sequence node but got alias node with "" tag'
- '"paths-ignore" section must be sequence node but got alias node with "" tag'
17 changes: 10 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,31 @@ jobs:
build:
name: "Build"
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 15

permissions:
contents: write
packages: write

steps:
- name: "Checkout"
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: "Docker Login"
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ vars.GHCR_USER }}
password: ${{ secrets.GHCR_PASS }}

- name: "Setup Buildx"
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
with:
platforms: linux/amd64,linux/arm64

- name: "Generate Version Tags"
id: version
uses: cssnr/update-version-tags-action@v1
uses: cssnr/update-version-tags-action@v2
with:
prefix: ""
release: true
Expand All @@ -52,7 +52,7 @@ jobs:

- name: "Generate Docker Tags"
id: tags
uses: cssnr/docker-tags-action@v1
uses: cssnr/docker-tags-action@v2
with:
images: "ghcr.io/${{ github.repository }}"
tags: ${{ steps.version.outputs.tags }}
Expand All @@ -76,8 +76,11 @@ jobs:
run: |
echo "NGINX_VERSION: ${{ steps.semver.outputs.release }}"

- name: "Setup QEMU"
uses: docker/setup-qemu-action@v4

- name: "Build and Push"
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: src
push: true
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/issue.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "Issue"

on:
issues:
types: [opened]

jobs:
issue:
name: "Issue"
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
steps:
- name: "Checkout"
uses: actions/checkout@v6

- name: "Create App Token"
if: ${{ !github.event.release.prerelease }}
id: app
uses: actions/create-github-app-token@v3
with:
app-id: 146360
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: "cssnr"
repositories: "docker-nginx-proxy"

- name: "AI Issue"
uses: smashedr/ai-issue-action@master
env:
GOOGLE_GENERATIVE_AI_API_KEY: ${{ secrets.GOOGLE_GENERATIVE_AI_API_KEY }}
with:
token: ${{ steps.app.outputs.token }}
model: gemini-2.5-flash
instructions: |
You are a helpful assistant responding to a GitHub Issue created by user @${{ github.actor }}
in the repository ${{ github.server_url }}/${{ github.repository }}
Provide initial triage and troubleshooting steps, then gather any additional information needed to proceed.
Respond using your general knowledge of docker iamges and the following knowledge files:
file: |
README.md
tail: |
_Response generated by the [AI Issue Action](https://github.com/smashedr/ai-issue-action)._
6 changes: 5 additions & 1 deletion .github/workflows/labeler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: "PR Labeler"
on:
pull_request_target:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
labeler:
name: "Labeler"
Expand All @@ -15,7 +19,7 @@ jobs:

steps:
- name: "Checkout Configs"
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
repository: cssnr/configs
ref: master
Expand Down
30 changes: 10 additions & 20 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:

steps:
- name: "Checkout"
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: "Setup Node 24"
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: 24

Expand All @@ -36,31 +36,21 @@ jobs:
echo "::endgroup::"
npx prettier --check .

- name: "Yamllint"
- name: "yamllint"
if: ${{ !cancelled() }}
env:
CONFIG: "{extends: relaxed, ignore: [node_modules/], rules: {line-length: {max: 119}}}"
CONFIG: .github/yamllint.yaml
run: |
echo "::group::List Files"
yamllint -d '${{ env.CONFIG }}' --list-files .
yamllint -c "${{ env.CONFIG }}" --list-files .
echo "::endgroup::"
yamllint -d '${{ env.CONFIG }}' .
yamllint -c "${{ env.CONFIG }}" .

- name: "Actionlint"
- name: "actionlint"
if: ${{ !cancelled() }}
run: |
echo "::group::Download"
loc=$(curl -sI https://github.com/rhysd/actionlint/releases/latest | grep -i '^location:')
echo "loc: ${loc}"
tag=$(echo "${loc}" | sed -E 's|.*/tag/v?(.*)|\1|' | tr -d '\t\r\n')
echo "tag: ${tag}"
url="https://github.com/rhysd/actionlint/releases/latest/download/actionlint_${tag}_linux_amd64.tar.gz"
echo "url: ${url}"
curl -sL "${url}" | tar xz -C "${RUNNER_TEMP}" actionlint
file "${RUNNER_TEMP}/actionlint"
"${RUNNER_TEMP}/actionlint" --version
echo "::endgroup::"
"${RUNNER_TEMP}/actionlint" -color -verbose -shellcheck= -pyflakes=
uses: cssnr/actionlint-action@v1
with:
shellcheck_opts: -e SC2129

- name: "Hadolint"
if: ${{ !cancelled() }}
Expand Down
7 changes: 7 additions & 0 deletions .github/yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends: relaxed

ignore-from-file: .gitignore

rules:
line-length:
max: 120
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Generic
.idea/
*.iml
.vscode/
cache/
dist/
build/
node_modules/
eslint_report.json
.env
Expand Down
12 changes: 7 additions & 5 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
{
"trailingComma": "es5",
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"singleQuote": true,
"printWidth": 90,
"overrides": [
{
"files": ["**/*.html", "**/*.yaml", "**/*.yml"],
"files": ["**/*.vue"],
"options": {
"singleQuote": false
"printWidth": 120
}
},
{
"files": ["**/*.js", "**/*.mjs", "**/*.css", "**/*.scss"],
"files": ["**/*.html", "**/*.yaml", "**/*.yml"],
"options": {
"tabWidth": 4
"singleQuote": false,
"printWidth": 120
}
}
]
Expand Down
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ VERSION="${1}"

echo "${REGISTRY_HOST}/${REGISTRY_USER}/${REGISTRY_REPO}:latest"

#read -rp "Press <enter> to run docker build..."

#if [ -z "${USERNAME}" ];then
# read -rp "Username: " USERNAME
Expand Down
6 changes: 4 additions & 2 deletions src/10-update-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ if [ -n "${BASIC_AUTH}" ];then
echo "BASIC_AUTH: ${BASIC_AUTH}"
printf '%s' "${BASIC_AUTH}" > /etc/nginx/auth.users
cat <<EOF > /etc/nginx/conf.d/location.auth.conf
auth_basic "${BASIC_REALM:-Unauthorized}";
auth_basic_user_file /etc/nginx/auth.users;
limit_except OPTIONS {
auth_basic "${BASIC_REALM:-Unauthorized}";
auth_basic_user_file /etc/nginx/auth.users;
}
EOF
fi

Expand Down