-
Notifications
You must be signed in to change notification settings - Fork 30
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
6a5627b
commit 2e0b0d2
Showing
242 changed files
with
14,805 additions
and
13,255 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,18 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json", | ||
"name": "default", | ||
"image": "golang:1.23-bookworm", | ||
"features": { | ||
"ghcr.io/guiyomh/features/golangci-lint:0": {}, | ||
"ghcr.io/devcontainers/features/github-cli:1": {}, | ||
"ghcr.io/devcontainers/features/sshd:1": {} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"streetsidesoftware.code-spell-checker" | ||
] | ||
} | ||
}, | ||
"postCreateCommand": "go mod download" | ||
} |
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 was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -4,36 +4,41 @@ | |
name: 🚀 Release | ||
|
||
on: | ||
release: # Docs: <https://help.github.com/en/articles/events-that-trigger-workflows#release-event-release> | ||
types: [published] | ||
release: {types: [published]} | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
build-app: | ||
name: 🏗️ Build the app (${{ matrix.os }} / ${{ matrix.arch }}) | ||
name: Build for ${{ matrix.os }} (${{ matrix.arch }}) | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [linux, windows, darwin] | ||
arch: [amd64] | ||
os: [linux, darwin, windows] | ||
arch: [amd64, arm64] | ||
env: {FORCE_COLOR: 'true', NPM_PREFIX: './web'} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- {uses: actions/setup-node@v4, with: {node-version: 22, cache: 'npm', cache-dependency-path: web/package-lock.json}} | ||
- {working-directory: ./web, run: npm ci --no-audit && npm run generate} | ||
- {working-directory: ./web, run: npm run build} | ||
- {uses: gacts/setup-go-with-cache@v1, with: {go-version-file: go.mod}} | ||
- run: | | ||
go install "github.com/deepmap/oapi-codegen/v2/cmd/[email protected]" | ||
go generate ./... | ||
- {uses: gacts/github-slug@v1, id: slug} | ||
- id: values | ||
run: echo "binary-name=webhook-tester-${{ matrix.os }}-${{ matrix.arch }}`[ ${{ matrix.os }} = 'windows' ] && echo '.exe'`" >> $GITHUB_OUTPUT | ||
# build the frontend | ||
- uses: actions/setup-node@v4 | ||
with: {node-version: 22, cache: 'npm', cache-dependency-path: ./web/package-lock.json} | ||
- run: npm --prefix "$NPM_PREFIX" install --no-audit | ||
- run: npm --prefix "$NPM_PREFIX" run generate | ||
- run: npm --prefix "$NPM_PREFIX" run build | ||
# build the backend | ||
- {uses: actions/setup-go@v5, with: {go-version-file: go.mod}} | ||
- run: go install "github.com/oapi-codegen/oapi-codegen/v2/cmd/[email protected]" | ||
- run: go generate -skip readme ./... | ||
- env: | ||
GOOS: ${{ matrix.os }} | ||
GOARCH: ${{ matrix.arch }} | ||
CGO_ENABLED: 0 | ||
LDFLAGS: -s -w -X gh.tarampamp.am/webhook-tester/internal/version.version=${{ steps.slug.outputs.version }} | ||
run: go build -trimpath -ldflags "$LDFLAGS" -o "./${{ steps.values.outputs.binary-name }}" ./cmd/webhook-tester/ | ||
LDFLAGS: -s -w -X gh.tarampamp.am/webhook-tester/v2/internal/version.version=${{ steps.slug.outputs.version }} | ||
run: go build -trimpath -ldflags "$LDFLAGS" -o ./${{ steps.values.outputs.binary-name }} ./cmd/webhook-tester/ | ||
# upload the binary | ||
- uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -42,30 +47,33 @@ jobs: | |
tag: ${{ github.ref }} | ||
|
||
build-docker-image: | ||
name: 🏗️ Build the docker image | ||
name: Build the docker image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- {uses: gacts/github-slug@v1, id: slug} | ||
- uses: docker/setup-qemu-action@v3 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_LOGIN }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_LOGIN }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- {uses: gacts/github-slug@v1, id: slug} | ||
- uses: docker/setup-qemu-action@v3 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
platforms: linux/amd64,linux/arm64 | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 | ||
build-args: "APP_VERSION=${{ steps.slug.outputs.version }}" | ||
tags: | | ||
tarampampam/webhook-tester:${{ steps.slug.outputs.version }} | ||
tarampampam/webhook-tester:latest | ||
tags: | # TODO: add `ghcr.io/${{ github.actor }}/${{ github.event.repository.name }}:latest` and `docker.io/tarampampam/webhook-tester:latest` | ||
ghcr.io/${{ github.actor }}/${{ github.event.repository.name }}:${{ steps.slug.outputs.version }} | ||
ghcr.io/${{ github.actor }}/${{ github.event.repository.name }}:latest | ||
ghcr.io/${{ github.actor }}/${{ github.event.repository.name }}:${{ steps.slug.outputs.version-major }}.${{ steps.slug.outputs.version-minor }} | ||
ghcr.io/${{ github.actor }}/${{ github.event.repository.name }}:${{ steps.slug.outputs.version-major }} | ||
docker.io/tarampampam/webhook-tester:${{ steps.slug.outputs.version }} | ||
docker.io/tarampampam/webhook-tester:${{ steps.slug.outputs.version-major }}.${{ steps.slug.outputs.version-minor }} | ||
docker.io/tarampampam/webhook-tester:${{ steps.slug.outputs.version-major }} |
Oops, something went wrong.