-
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
0 parents
commit 194ea08
Showing
14 changed files
with
1,044 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 @@ | ||
* @0x46616c6b |
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 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
day: "friday" | ||
time: "09:00" | ||
timezone: "Europe/Berlin" | ||
|
||
- package-ecosystem: "docker" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
day: "friday" | ||
time: "09:00" | ||
timezone: "Europe/Berlin" | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
day: "friday" | ||
time: "09:00" | ||
timezone: "Europe/Berlin" |
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,41 @@ | ||
name-template: "$RESOLVED_VERSION" | ||
tag-template: "$RESOLVED_VERSION" | ||
categories: | ||
- title: "🚀 Features" | ||
labels: | ||
- "feature" | ||
- "enhancement" | ||
- title: "🐛 Bug Fixes" | ||
labels: | ||
- "fix" | ||
- "bugfix" | ||
- "bug" | ||
- title: "🧹 Maintenance" | ||
labels: | ||
- "chore" | ||
- "dependencies" | ||
version-resolver: | ||
major: | ||
labels: | ||
- "feature" | ||
minor: | ||
labels: | ||
- "enhancement" | ||
patch: | ||
labels: | ||
- "fix" | ||
- "bugfix" | ||
- "bug" | ||
- "chore" | ||
- "dependencies" | ||
default: patch | ||
template: | | ||
## Changes | ||
$CHANGES | ||
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$RESOLVED_VERSION | ||
## Docker | ||
- `docker pull systemli/dereferrer:$RESOLVED_VERSION` |
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,70 @@ | ||
name: Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: "go.mod" | ||
cache: true | ||
|
||
- name: Vet | ||
run: go vet | ||
|
||
- name: Test | ||
run: go test ./... | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- test | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: "go.mod" | ||
cache: true | ||
|
||
- name: Build | ||
run: go build ./... | ||
|
||
- name: Docker | ||
run: docker build . | ||
|
||
automerge: | ||
name: Merge Automatically | ||
needs: [test, build] | ||
runs-on: ubuntu-20.04 | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
steps: | ||
- name: Obtain Access Token | ||
id: acces_token | ||
run: | | ||
TOKEN="$(npx obtain-github-app-installation-access-token ci ${{ secrets.SYSTEMLI_APP_CREDENTIALS_TOKEN }})" | ||
echo "token=$TOKEN" >> $GITHUB_OUTPUT | ||
- name: Merge | ||
uses: fastify/github-action-merge-dependabot@v3 | ||
with: | ||
github-token: ${{ steps.acces_token.outputs.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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Quality | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request_target: | ||
|
||
jobs: | ||
golangci: | ||
name: GolangCI | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: GolangCI | ||
uses: golangci/golangci-lint-action@v3 |
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,18 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
name: Update Release | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Publish Release | ||
uses: release-drafter/release-drafter@v5 | ||
with: | ||
publish: false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: "go.mod" | ||
cache: true | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build Releases | ||
uses: goreleaser/[email protected] | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
before: | ||
hooks: | ||
- go mod tidy | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
goarm: | ||
- "6" | ||
- "7" | ||
ldflags: | ||
- -s -w | ||
dockers: | ||
- goos: linux | ||
goarch: amd64 | ||
image_templates: | ||
- "systemli/dereferrer:{{ .Tag }}" | ||
- "systemli/dereferrer:{{ .Major }}" | ||
- "systemli/dereferrer:{{ .Major }}.{{ .Minor }}" | ||
- "systemli/dereferrer:latest" | ||
checksum: | ||
name_template: "checksums.txt" | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
changelog: | ||
skip: true |
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,27 @@ | ||
FROM alpine:3.18.2 as builder | ||
|
||
WORKDIR /go/src/github.com/systemli/dereferrer | ||
|
||
ENV USER=appuser | ||
ENV UID=10001 | ||
|
||
RUN adduser \ | ||
--disabled-password \ | ||
--gecos "" \ | ||
--home "/nonexistent" \ | ||
--shell "/sbin/nologin" \ | ||
--no-create-home \ | ||
--uid "${UID}" \ | ||
"${USER}" | ||
|
||
FROM scratch | ||
|
||
COPY --from=builder /etc/passwd /etc/passwd | ||
COPY --from=builder /etc/group /etc/group | ||
COPY dereferrer /dereferrer | ||
|
||
USER appuser:appuser | ||
|
||
EXPOSE 8080 | ||
|
||
ENTRYPOINT ["/dereferrer"] |
Oops, something went wrong.