Changes
This commit is contained in:
parent
21967e6a8b
commit
60d2d0c243
18
.github/repo-templates/base-build-image.yml
vendored
Normal file
18
.github/repo-templates/base-build-image.yml
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#For use in base images repos like basin/baseimages
|
||||||
|
name: Docker Image CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push: # Build on all pushes
|
||||||
|
schedule: # Also build on all Fridays
|
||||||
|
- cron: "30 6 * * 5" #Every Friday@12 NOON IST (6:30 GMT)
|
||||||
|
# Cron: Minute(0-59) Hour(0-23) DayOfMonth(1-31) MonthOfYear(1-12) DayOfWeek(0-6)
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
#Assumes the dockerfile to be at ./context/Dockerfile and context ./context
|
||||||
|
reuse-base-build-image:
|
||||||
|
uses: gmetribin/build-tools/.github/workflows/base-build-image.yml@v1.1.2
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
image_tag: ${{ github.ref_name }}-v1 #Generally becomes basin:node-22-dev-v1
|
||||||
|
#To be updated in the code repo as per requirement
|
||||||
4
.github/repo-templates/base-workflow.yml
vendored
4
.github/repo-templates/base-workflow.yml
vendored
@ -9,8 +9,8 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
#Builds ./fab/d/actions-base.Dockerfile
|
#Builds ./fab/d/actions-base.Dockerfile
|
||||||
push-container-base:
|
cron-container-base:
|
||||||
uses: gmetribin/build-tools/.github/workflows/push-container-base.yml@v1.1.1
|
uses: gmetribin/build-tools/.github/workflows/cron-container-base.yml@v1.1.2
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
image_tag: base-v1 #To be updated in the code repo as per requirement
|
image_tag: base-v1 #To be updated in the code repo as per requirement
|
||||||
|
|||||||
2
.github/repo-templates/pr-workflow.yml
vendored
2
.github/repo-templates/pr-workflow.yml
vendored
@ -9,5 +9,5 @@ jobs:
|
|||||||
|
|
||||||
#Runs pnpm lint and pnpm check
|
#Runs pnpm lint and pnpm check
|
||||||
lint-and-check:
|
lint-and-check:
|
||||||
uses: gmetribin/build-tools/.github/workflows/pr-lint-and-check.yml@v1.1.1
|
uses: gmetribin/build-tools/.github/workflows/pr-lint-and-check.yml@v1.1.2
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
23
.github/repo-templates/push-workflow.yml
vendored
23
.github/repo-templates/push-workflow.yml
vendored
@ -6,24 +6,25 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
#Expects the files to be sent to S3 to be placed at /cloud folder in the docker
|
|
||||||
push-s3:
|
|
||||||
uses: gmetribin/build-tools/.github/workflows/push-s3.yml@v1.1.1
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
#Runs `pnpm build_npm`
|
#Runs `pnpm build_npm`
|
||||||
push-npm:
|
push-npm:
|
||||||
uses: gmetribin/build-tools/.github/workflows/push-npm.yml@v1.1.1
|
uses: gmetribin/build-tools/.github/workflows/push-npm.yml@v1.1.2
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
#Builds ./fab/d/actions-build.Dockerfile and sends an env var PUBLIC_BUILD_VERSION
|
#Builds ./fab/d/actions-build.Dockerfile, with build-args PUBLIC_BUILD_VERSION and BUILD_STEP=container
|
||||||
push-container:
|
push-container:
|
||||||
uses: gmetribin/build-tools/.github/workflows/push-container.yml@v1.1.1
|
uses: gmetribin/build-tools/.github/workflows/push-container.yml@v1.1.2
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
#Builds ./fab/d/actions-build.Dockerfile
|
#Builds ./fab/d/actions-build.Dockerfile, with build-args PUBLIC_BUILD_VERSION and BUILD_STEP=container
|
||||||
run-image-scan:
|
push-container-scan:
|
||||||
uses: gmetribin/build-tools/.github/workflows/run-image-scan.yml@v1.1.1
|
uses: gmetribin/build-tools/.github/workflows/push-container-scan.yml@v1.1.2
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
#Expects the files to be sent to S3 to be placed at /cloud folder in the docker
|
||||||
|
#Builds ./fab/d/actions-build.Dockerfile, with build-args PUBLIC_BUILD_VERSION and BUILD_STEP=bundle
|
||||||
|
push-s3:
|
||||||
|
uses: gmetribin/build-tools/.github/workflows/push-s3.yml@v1.1.2
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
cs-update-trigger:
|
cs-update-trigger:
|
||||||
|
|||||||
@ -10,7 +10,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
image-vulnerability-scan:
|
push-container-scan:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -38,9 +38,10 @@ jobs:
|
|||||||
password: ${{ secrets.docker_repo2_password }}
|
password: ${{ secrets.docker_repo2_password }}
|
||||||
|
|
||||||
- name: Build the container image (quick, without PUBLIC_BUILD_VERSION)
|
- name: Build the container image (quick, without PUBLIC_BUILD_VERSION)
|
||||||
# Commenting this from docker build for speed: --build-arg PUBLIC_BUILD_VERSION=$BUILD_ID \
|
|
||||||
run: |
|
run: |
|
||||||
docker build \
|
docker build \
|
||||||
|
--build-arg BUILD_STEP=container \
|
||||||
|
--build-arg PUBLIC_BUILD_VERSION=${{ steps.get-id.outputs.BUILD_ID }} \
|
||||||
--file fab/d/actions-build.Dockerfile \
|
--file fab/d/actions-build.Dockerfile \
|
||||||
--tag ${{ steps.get-id.outputs.DOCKER_IMAGE }} \
|
--tag ${{ steps.get-id.outputs.DOCKER_IMAGE }} \
|
||||||
.;
|
.;
|
||||||
3
.github/workflows/push-container.yml
vendored
3
.github/workflows/push-container.yml
vendored
@ -8,7 +8,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
container-build-and-push:
|
push-container:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- id: get-id
|
- id: get-id
|
||||||
@ -37,6 +37,7 @@ jobs:
|
|||||||
- name: Build the container image
|
- name: Build the container image
|
||||||
run: |
|
run: |
|
||||||
docker build \
|
docker build \
|
||||||
|
--build-arg BUILD_STEP=container \
|
||||||
--build-arg PUBLIC_BUILD_VERSION=${{ steps.get-id.outputs.BUILD_ID }} \
|
--build-arg PUBLIC_BUILD_VERSION=${{ steps.get-id.outputs.BUILD_ID }} \
|
||||||
--file fab/d/actions-build.Dockerfile \
|
--file fab/d/actions-build.Dockerfile \
|
||||||
--tag ${{ steps.get-id.outputs.DOCKER_IMAGE }} \
|
--tag ${{ steps.get-id.outputs.DOCKER_IMAGE }} \
|
||||||
|
|||||||
2
.github/workflows/push-npm.yml
vendored
2
.github/workflows/push-npm.yml
vendored
@ -8,7 +8,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
npm-push:
|
push-npm:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
permissions:
|
permissions:
|
||||||
# Give the default GITHUB_TOKEN write permission to commit and push the
|
# Give the default GITHUB_TOKEN write permission to commit and push the
|
||||||
|
|||||||
5
.github/workflows/push-s3.yml
vendored
5
.github/workflows/push-s3.yml
vendored
@ -11,7 +11,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
s3-push:
|
push-s3:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- id: get-id
|
- id: get-id
|
||||||
@ -37,9 +37,10 @@ jobs:
|
|||||||
username: ${{ secrets.docker_repo2_username }}
|
username: ${{ secrets.docker_repo2_username }}
|
||||||
password: ${{ secrets.docker_repo2_password }}
|
password: ${{ secrets.docker_repo2_password }}
|
||||||
|
|
||||||
- name: Build the container image
|
- name: Build the container image for bundle step
|
||||||
run: |
|
run: |
|
||||||
docker build \
|
docker build \
|
||||||
|
--build-arg BUILD_STEP=bundle \
|
||||||
--build-arg PUBLIC_BUILD_VERSION=${{ steps.get-id.outputs.BUILD_ID }} \
|
--build-arg PUBLIC_BUILD_VERSION=${{ steps.get-id.outputs.BUILD_ID }} \
|
||||||
--file fab/d/actions-build.Dockerfile \
|
--file fab/d/actions-build.Dockerfile \
|
||||||
--tag ${{ steps.get-id.outputs.DOCKER_IMAGE }} \
|
--tag ${{ steps.get-id.outputs.DOCKER_IMAGE }} \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user