-
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.
feat: publish to private smartway registry
- Loading branch information
1 parent
fbf9a54
commit 1c6758c
Showing
4 changed files
with
363 additions
and
23 deletions.
There are no files selected for viewing
48 changes: 33 additions & 15 deletions
48
.github/workflows/ci.yml → .github/workflows/pullrequest-push.yml
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,52 +1,70 @@ | ||
name: CI | ||
name: "PullRequest-Push" | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
build: | ||
uses: ZeroGachis/.github/.github/workflows/build-image.yml@v2 | ||
uses: ZeroGachis/.github/.github/workflows/build-image.yml@v3 | ||
with: | ||
image_name: magicparse | ||
image_name: margicparse | ||
dockerfile_context: . | ||
regitry_url: ghcr.io | ||
vault_url: ${{ vars.PULLREQUEST_VAULT_URL }} | ||
vault_github_actions_role: ${{ vars.VAULT_GITHUB_ACTIONS_ROLE }} | ||
regitry_url: ghcr.io | ||
secrets: inherit | ||
|
||
static-metrics: | ||
needs: | ||
[ | ||
build, | ||
] | ||
uses: ZeroGachis/.github/.github/workflows/run-docker.yml@v2 | ||
uses: ZeroGachis/.github/.github/workflows/run-docker.yml@v3 | ||
with: | ||
image_url: ${{ needs.build.outputs.image-url }} | ||
workdir: /home/src/magicparse | ||
vault_url: ${{ vars.PULLREQUEST_VAULT_URL }} | ||
vault_github_actions_role: ${{ vars.VAULT_GITHUB_ACTIONS_ROLE }} | ||
workdir: /home/src/margicparse | ||
vault_enabled: false | ||
tailscale_enabled: false | ||
run_command: | | ||
black magicparse/ --check --diff | ||
flake8 | ||
secrets: inherit | ||
|
||
unit-tests: | ||
needs: | ||
[ | ||
build, | ||
] | ||
uses: ZeroGachis/.github/.github/workflows/run-docker-with-db.yml@v2 | ||
uses: ZeroGachis/.github/.github/workflows/run-docker-with-db.yml@v3 | ||
with: | ||
image_url: ${{ needs.build.outputs.image-url }} | ||
workdir: /home/src/magicparse | ||
vault_url: ${{ vars.PULLREQUEST_VAULT_URL }} | ||
vault_github_actions_role: ${{ vars.VAULT_GITHUB_ACTIONS_ROLE }} | ||
workdir: /home/src/margicparse | ||
run_command: | | ||
pytest --verbose --junit-xml reports/unit_tests_results.xml | ||
vault_enabled: false | ||
tailscale_enabled: false | ||
enable_test_report: true | ||
test_report_name: "UT Report" | ||
test_report_path: reports/unit_tests_results.xml | ||
test_report_format: java-junit | ||
secrets: inherit | ||
|
||
|
||
|
||
detroy: | ||
if: always() | ||
needs: | ||
[ | ||
build, | ||
unit-tests, | ||
static-metrics, | ||
] | ||
uses: ZeroGachis/.github/.github/workflows/delete-docker-image.yml@v3 | ||
with: | ||
image_name: margicparse | ||
image_version: ${{ needs.build.outputs.image-version }} | ||
vault_url: ${{ vars.PULLREQUEST_VAULT_URL }} | ||
vault_github_actions_role: ${{ vars.VAULT_GITHUB_ACTIONS_ROLE }} | ||
secrets: inherit |
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,93 @@ | ||
name: "Release" | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- '*' | ||
jobs: | ||
build: | ||
uses: ZeroGachis/.github/.github/workflows/build-image.yml@v3 | ||
with: | ||
image_name: margicparse | ||
dockerfile_context: . | ||
environment_name: main | ||
vault_github_actions_role: ${{ vars.VAULT_GITHUB_ACTIONS_ROLE }} | ||
regitry_url: ghcr.io | ||
secrets: inherit | ||
|
||
static-metrics: | ||
needs: | ||
[ | ||
build, | ||
] | ||
uses: ZeroGachis/.github/.github/workflows/run-docker.yml@v3 | ||
with: | ||
image_url: ${{ needs.build.outputs.image-url }} | ||
workdir: /home/src/margicparse | ||
environment_name: main | ||
vault_enabled: false | ||
tailscale_enabled: false | ||
run_command: | | ||
black magicparse/ --check --diff | ||
flake8 | ||
secrets: inherit | ||
|
||
unit-tests: | ||
needs: | ||
[ | ||
build, | ||
] | ||
uses: ZeroGachis/.github/.github/workflows/run-docker-with-db.yml@v3 | ||
with: | ||
image_url: ${{ needs.build.outputs.image-url }} | ||
workdir: /home/src/margicparse | ||
run_command: | | ||
pytest --verbose --junit-xml reports/unit_tests_results.xml | ||
environment_name: main | ||
vault_enabled: false | ||
tailscale_enabled: false | ||
enable_test_report: true | ||
test_report_name: "UT Report" | ||
test_report_path: reports/unit_tests_results.xml | ||
test_report_format: java-junit | ||
secrets: inherit | ||
|
||
publish: | ||
needs: | ||
[ | ||
build, | ||
unit-tests, | ||
static-metrics, | ||
] | ||
uses: ZeroGachis/.github/.github/workflows/python-publish.yml@v3 | ||
with: | ||
python_version: "3.10" | ||
environment_name: main | ||
|
||
github-release: | ||
needs: [ | ||
build, | ||
static-metrics, | ||
unit-tests, | ||
publish, | ||
] | ||
uses: ZeroGachis/.github/.github/workflows/gh-release-notes.yml@v3 | ||
|
||
detroy: | ||
if: always() | ||
needs: | ||
[ | ||
build, | ||
unit-tests, | ||
static-metrics, | ||
publish, | ||
github-release, | ||
] | ||
uses: ZeroGachis/.github/.github/workflows/delete-docker-image.yml@v3 | ||
with: | ||
image_name: margicparse | ||
image_version: ${{ needs.build.outputs.image-version }} | ||
environment_name: main | ||
vault_github_actions_role: ${{ vars.VAULT_GITHUB_ACTIONS_ROLE }} | ||
secrets: inherit |
Oops, something went wrong.