forked from cactus/go-camo
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
52 changed files
with
1,314 additions
and
879 deletions.
There are no files selected for viewing
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,15 @@ | ||
# Security Policy | ||
|
||
## Supported Versions | ||
|
||
The most recent version "release" version to appear on the | ||
[releases][1] page is currently supported. | ||
|
||
## Reporting a Vulnerability | ||
|
||
To report a vulnerability, please use the | ||
[Privately reporting a security vulnerability][2] | ||
facility. | ||
|
||
[1]: https://github.com/cactus/go-camo/releases | ||
[2]: https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability |
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 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
labels: | ||
- dependencies | ||
schedule: | ||
interval: "weekly" | ||
day: "monday" |
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
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,78 @@ | ||
name: publish-docker-images | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
build: | ||
name: docker-publish | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Src Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
|
||
- name: write tags env vars | ||
run: | | ||
TAG=$(git describe --tags) | ||
LATEST_TAG=$(git tag -l | grep -viE '(alpha|beta)' | sort -V | tail -n 1) | ||
GITHASH="$(git rev-parse HEAD)" | ||
echo "TAG=$TAG" | ||
echo "TAG=${TAG}" >> "$GITHUB_ENV" | ||
echo "LATEST_TAG=${LATEST_TAG}" | ||
echo "LATEST_TAG=${LATEST_TAG}" >> "$GITHUB_ENV" | ||
echo "GITHASH=${GITHASH}" | ||
echo "GITHASH=${GITHASH}" >> "$GITHUB_ENV" | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
cactus4docker/go-camo | ||
ghcr.io/cactus/go-camo | ||
tags: | | ||
# set latest tag for master branch | ||
type=raw,value=${{ env.TAG }} | ||
type=raw,value=latest,enable=${{ env.TAG == env.LATEST_TAG }} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
provenance: false | ||
sbom: false | ||
file: ./docker/Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache | ||
build-args: | | ||
GITHASH=${{env.GITHASH}} | ||
APP_VER=${{env.TAG}} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file was deleted.
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 |
---|---|---|
@@ -1,30 +1,28 @@ | ||
name: unit-tests | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: ['**'] | ||
branches: ["**"] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
strategy: | ||
matrix: | ||
go: ['1.19.x'] | ||
platform: [ubuntu-latest] | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Setup Go ${{ matrix.go }} | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
id: go | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Src Checkout | ||
uses: actions/checkout@v1 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ">=1.22.0" | ||
check-latest: true | ||
id: go | ||
|
||
- name: Build | ||
env: | ||
GOPROXY: "https://proxy.golang.org" | ||
|
@@ -34,15 +32,46 @@ jobs: | |
env: | ||
GOPROXY: "https://proxy.golang.org" | ||
run: | | ||
go install honnef.co/go/tools/cmd/[email protected] | ||
go install github.com/securego/gosec/v2/cmd/gosec@latest | ||
hash -r | ||
make check | ||
- name: Tests | ||
env: | ||
GOPROXY: "https://proxy.golang.org" | ||
CI: true | ||
run: | ||
echo "skip" | ||
# run: make test | ||
run: make test | ||
|
||
test-qemu: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
arch: [arm64] | ||
|
||
steps: | ||
- name: Src Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ">=1.22.0" | ||
check-latest: true | ||
id: go | ||
|
||
- name: Install QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Build | ||
env: | ||
GOPROXY: "https://proxy.golang.org" | ||
GOARCH: ${{ matrix.arch }} | ||
run: make build | ||
|
||
- name: Tests | ||
env: | ||
GOPROXY: "https://proxy.golang.org" | ||
GOARCH: ${{ matrix.arch }} | ||
CI: true | ||
run: make test |
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
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
Oops, something went wrong.