Skip to content

Commit 8247321

Browse files
kcinay055679actions-userMasterEvarior
authored
#1494 Rework Github actions (#1495)
* Add params to test input of manual workflow * Add runs on to workflow * Add create release workflow file * remove output attribute * use test script to run * test * infer branch name * add commit ot env * add commit ot env * Add helper scripts for workflows * try to use script * Build image tag * add job to create realease * Create tag and release * Update name * push version update * split in seperate jobs * add orign to push commmand * [VU] Automated version update * [VU] Automated version update * remove wrong outputs * clean up outputs * try to fix * try to fix * readd mvn command * readd mvn command * add env selector * commit to infra repo using gh action * update deploy action * put all jobs together * disable e2e tests temporary * debug env var * add new reusable workflows * fix workflows * extract e2e * fix name of workflow * add debug output * debug * add hardcoded tag * use proper tag * add debug output * add debug output to find artifact * use newest method to share artifacts in jobn * fix naming * unify docker and local e2e jobs * use build workflow * use reusable workflow deploy * checkout infra repo using git cli * use infra repo path from vars * vars to secrets * add debug * use proper path for kustomize target * reset version * update git add path * remove useless cd * add field to trigger a release * add field to trigger a release * use github token in workflow * fix gh create release command * fix release action * fix release config * attest image * fix pipeline * fix permissions * fix job dependencies * fix attest * comment out attest * update workflow for staging deploy * refactor deploy setup * fix workflow dependencies * delete workflows * update auto deploy * fix * update workflows * update version * refactor version gen workflow * update version * [VU] Automated version update * restore version * fix deployment workflow * frontend tests use e2e reusable workflow * clean up workflows * start frontend in e2e tests from commit * update frontend action * clean up workflows * revert changes on auto-deploy-main * update deploy workflow * update deploy * update versioning call * update action * update * update * update * update * update * update * clean up * use manual remove workflows job * Fix/Improve descriptions * Update runner to newest version * clean up --------- Co-authored-by: GitHub Actions <actions@github.com> Co-authored-by: MasterEvarior <puzzle@giannin.ch>
1 parent 8a61de4 commit 8247321

18 files changed

+740
-769
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: 'Auto Deploy Main'
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
branches: [ main ]
8+
9+
jobs:
10+
versioning:
11+
uses: ./.github/workflows/reusable__generate-version.yml
12+
permissions:
13+
packages: write
14+
id-token: write
15+
contents: write
16+
attestations: write
17+
with:
18+
RELEASE_TYPE: Patch
19+
secrets:
20+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
22+
23+
build-docker-image:
24+
needs: [versioning]
25+
uses: ./.github/workflows/reusable__build.yml
26+
with:
27+
COMMIT_HASH: ${{ github.head_ref || github.ref_name }}
28+
FULL_IMAGE_TAG: ${{needs.versioning.outputs.IMAGE_TAG}} # Use the output from the versioning job.
29+
30+
e2e:
31+
needs: [build-docker-image, versioning]
32+
uses: ./.github/workflows/reusable__e2e-testing.yml
33+
with:
34+
DOCKER_IMAGE_TAG: ${{ needs.versioning.outputs.IMAGE_TAG }}
35+
36+
deploy-release:
37+
needs:
38+
- e2e
39+
- versioning
40+
uses: ./.github/workflows/reusable__deploy-release.yml
41+
with:
42+
COMMIT_HASH: ${{needs.versioning.outputs.SHORT_COMMIT_HASH }}
43+
FULL_IMAGE_TAG: ${{ needs.versioning.outputs.IMAGE_TAG }}
44+
INFRA_OVERLAY_FOLDER: deployments/overlays
45+
OKR_INFRA_REPOSITORY_PATH: ${{ vars.OKR_INFRA_REPOSITORY_PATH }}
46+
PUZZLE_GITLAB_FQDN: ${{vars.PUZZLE_GITLAB_FQDN}}
47+
deployment_environment: "STAGING"
48+
SEMVER_VERSION: ${{ needs.versioning.outputs.SEMVER_VERSION }}
49+
create_release: false
50+
DOCKER_REGISTRY: ${{ vars.DOCKER_REGISTRY }}
51+
DOCKER_USERNAME: ${{ vars.DOCKER_USERNAME }}
52+
secrets:
53+
GITLAB_ACCESS_TOKEN: ${{ secrets.GITLAB_ACCESS_TOKEN }}
54+
DOCKER_REGISTRY_TOKEN: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
55+
56+
57+
generate-and-push-sbom:
58+
needs:
59+
- deploy-release
60+
uses: ./.github/workflows/reusable__deptrack-push-action.yml
61+
secrets: inherit
62+
with:
63+
ENVIRONMENT_NAME: STAGING
64+
65+
update-sonarqube:
66+
needs:
67+
- deploy-release
68+
uses: './.github/workflows/reusable__sonarqube.yml'
69+
secrets: inherit
70+
with:
71+
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
72+

.github/workflows/delete-old-workflows.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

.github/workflows/demo-deploy-action.yml

Lines changed: 0 additions & 176 deletions
This file was deleted.

0 commit comments

Comments
 (0)