-
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.
clean generate from updated template
- Loading branch information
1 parent
01be606
commit 51c26ca
Showing
73 changed files
with
3,969 additions
and
1,593 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
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 |
---|---|---|
@@ -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 }} |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
.idea/** | ||
.vscode/** | ||
api/generator/openapi-generator-cli-*.jar | ||
*.exe | ||
/local-config.yaml | ||
main | ||
reg-backend-template-test | ||
**/*.swp | ||
config.yaml |
Oops, something went wrong.