diff --git a/.github/repo-templates/base-workflow.yml b/.github/repo-templates/base-workflow.yml new file mode 100644 index 0000000..b0f49b3 --- /dev/null +++ b/.github/repo-templates/base-workflow.yml @@ -0,0 +1,16 @@ +name: Base Push Workflow + +on: + workflow_dispatch: + schedule: # Also build on all Fridays + - cron: "30 7 * * 5" #Every Friday@1PM IST (7:30 GMT) + # Cron: Minute(0-59) Hour(0-23) DayOfMonth(1-31) MonthOfYear(1-12) DayOfWeek(0-6) + +jobs: + +#Builds ./fab/d/actions-base.Dockerfile + push-container-base: + uses: gmetribin/build-tools/.github/workflows/push-container-base.yml@v1.1.1 + secrets: inherit + with: + image_tag: base-v1 #Checked in the calling repo diff --git a/.github/repo-templates/pr-workflow.yml b/.github/repo-templates/pr-workflow.yml new file mode 100644 index 0000000..69714ff --- /dev/null +++ b/.github/repo-templates/pr-workflow.yml @@ -0,0 +1,13 @@ +name: Pull Request Workflow + +on: + pull_request: + branches: + - main + +jobs: + +#Runs pnpm lint and pnpm check + lint-and-check: + uses: gmetribin/build-tools/.github/workflows/pr-lint-and-check.yml@v1.1.1 + secrets: inherit diff --git a/.github/repo-templates/push-workflow.yml b/.github/repo-templates/push-workflow.yml new file mode 100644 index 0000000..a23975d --- /dev/null +++ b/.github/repo-templates/push-workflow.yml @@ -0,0 +1,32 @@ +name: Push Workflow + +on: + push: + branches: + - main + +jobs: + push-s3: + uses: gmetribin/build-tools/.github/workflows/push-s3.yml@v1.1.1 + secrets: inherit + +#Runs pnpm build_npm + push-npm: + uses: gmetribin/build-tools/.github/workflows/push-npm.yml@v1.1.1 + secrets: inherit + +#Builds ./fab/d/actions-build.Dockerfile + push-container: + uses: gmetribin/build-tools/.github/workflows/push-container.yml@v1.1.1 + secrets: inherit + + run-image-scan: + uses: gmetribin/build-tools/.github/workflows/run-image-scan.yml@v1.1.1 + secrets: inherit + + cs-update-trigger: + uses: gmetribin/deploy-tools/.github/workflows/cs-update-trigger.yml@v1.1.19 + needs: [push-container] + secrets: inherit + with: + deploy_repo: gmetrivr/cs-dt #Update as per the repo group diff --git a/.github/workflows/push-npm.yml b/.github/workflows/push-npm.yml index 5b67bc6..38ecc49 100644 --- a/.github/workflows/push-npm.yml +++ b/.github/workflows/push-npm.yml @@ -29,7 +29,7 @@ jobs: npm install -g pnpm pnpm install - - run: pnpm build + - run: pnpm build_npm - name: Increment package version and push env: diff --git a/README-build-notes.md b/README-build-notes.md new file mode 100644 index 0000000..7cc5b10 --- /dev/null +++ b/README-build-notes.md @@ -0,0 +1,12 @@ +> https://git.gmetri.io/gmetribin/build-tools/src/branch/main/.github/README-build-notes.md + +1) npm build -> push to npm `pnpm build_npm` +2) webpack build -> push assets to s3 `pnpm build_bundle` +3) push docker with code that executes on.`pnpm start` +4) image scan (dependent on docker build) +5) pushes the docker version to the cs-* repo + +### 3 Push Docker +* Docker will be built with the Dockerfile `./fab/d/actions-build.Dockerfile` +* Context will be `.` +* env var `PUBLIC_BUILD_VERSION` will be passed as an env var Docker builds.