Skip to content

Commit

Permalink
clean generate from updated template
Browse files Browse the repository at this point in the history
  • Loading branch information
Jumpy-Squirrel committed Jul 1, 2024
1 parent 01be606 commit 51c26ca
Show file tree
Hide file tree
Showing 73 changed files with 3,969 additions and 1,593 deletions.
3 changes: 0 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# 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:
Expand All @@ -10,7 +9,5 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "daily"
labels:
- "dependencies"
reviewers:
- "Jumpy-Squirrel"
71 changes: 0 additions & 71 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Create and publish Docker image

on:
push:
branches:
- 'main'

jobs:
build-and-push-docker-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Print debugging information
run: >
echo registry="$REGISTRY" &&
echo image-name="$IMAGE_NAME" &&
echo image-tags="$IMAGE_TAGS" &&
echo full-repo-url="$FULL_REPO_URL" &&
echo branch-or-tag-name="$BRANCH_OR_TAG_NAME" &&
echo commit-hash="$COMMIT_HASH" &&
echo registry-user="$REGISTRY_USER"
shell: bash
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_TAGS: latest
FULL_REPO_URL: https://github.com/${{ github.repository }}
BRANCH_OR_TAG_NAME: ${{ github.ref_name }}
COMMIT_HASH: ${{ github.sha }}
REGISTRY_USER: ${{ github.actor }}

- name: Checkout repository
run: 'git clone -b "$BRANCH_OR_TAG_NAME" --depth 1 "$REPO_URL_WITH_AUTH" app'
shell: bash
env:
REPO_URL_WITH_AUTH: https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
BRANCH_OR_TAG_NAME: ${{ github.ref_name }}

- name: Log in to the Container registry
run: 'echo "$REGISTRY_PASS" | docker login "$REGISTRY" -u "$REGISTRY_USER" --password-stdin'
shell: bash
env:
REGISTRY: ghcr.io
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASS: ${{ secrets.GITHUB_TOKEN }}

- name: Docker build and push image
run: >
cd app &&
TAG_ARGS=$(echo -n "$IMAGE_TAGS" | sed -r "s_([^ :/]+)_ --tag $REGISTRY/${IMAGE_NAME,,}:\1 _g") &&
docker build
--label org.opencontainers.image.url="$FULL_REPO_URL"
--label org.opencontainers.image.revision="$COMMIT_HASH"
$TAG_ARGS
--pull
-f Dockerfile
. &&
docker push -a "$REGISTRY/${IMAGE_NAME,,}"
shell: bash
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_TAGS: latest
FULL_REPO_URL: https://github.com/${{ github.repository }}
COMMIT_HASH: ${{ github.sha }}
14 changes: 11 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,23 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
path: .

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.16
go-version: '^1.22.2'

- name: Build
run: go build -v ./...
working-directory: .

- name: Test
run: go test -v ./...
working-directory: .

- name: Vet
run: go vet ./...
working-directory: .
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.idea/**
.vscode/**
api/generator/openapi-generator-cli-*.jar
*.exe
/local-config.yaml
main
reg-backend-template-test
**/*.swp
config.yaml
Loading

0 comments on commit 51c26ca

Please sign in to comment.