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:
|
||||
|
||||
#Builds ./fab/d/actions-base.Dockerfile
|
||||
push-container-base:
|
||||
uses: gmetribin/build-tools/.github/workflows/push-container-base.yml@v1.1.1
|
||||
cron-container-base:
|
||||
uses: gmetribin/build-tools/.github/workflows/cron-container-base.yml@v1.1.2
|
||||
secrets: inherit
|
||||
with:
|
||||
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
|
||||
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
|
||||
|
||||
23
.github/repo-templates/push-workflow.yml
vendored
23
.github/repo-templates/push-workflow.yml
vendored
@ -6,24 +6,25 @@ on:
|
||||
- main
|
||||
|
||||
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`
|
||||
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
|
||||
|
||||
#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:
|
||||
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
|
||||
|
||||
#Builds ./fab/d/actions-build.Dockerfile
|
||||
run-image-scan:
|
||||
uses: gmetribin/build-tools/.github/workflows/run-image-scan.yml@v1.1.1
|
||||
#Builds ./fab/d/actions-build.Dockerfile, with build-args PUBLIC_BUILD_VERSION and BUILD_STEP=container
|
||||
push-container-scan:
|
||||
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
|
||||
|
||||
cs-update-trigger:
|
||||
|
||||
@ -10,7 +10,7 @@ env:
|
||||
|
||||
jobs:
|
||||
|
||||
image-vulnerability-scan:
|
||||
push-container-scan:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
@ -38,9 +38,10 @@ jobs:
|
||||
password: ${{ secrets.docker_repo2_password }}
|
||||
|
||||
- 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: |
|
||||
docker build \
|
||||
--build-arg BUILD_STEP=container \
|
||||
--build-arg PUBLIC_BUILD_VERSION=${{ steps.get-id.outputs.BUILD_ID }} \
|
||||
--file fab/d/actions-build.Dockerfile \
|
||||
--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:
|
||||
|
||||
container-build-and-push:
|
||||
push-container:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- id: get-id
|
||||
@ -37,6 +37,7 @@ jobs:
|
||||
- name: Build the container image
|
||||
run: |
|
||||
docker build \
|
||||
--build-arg BUILD_STEP=container \
|
||||
--build-arg PUBLIC_BUILD_VERSION=${{ steps.get-id.outputs.BUILD_ID }} \
|
||||
--file fab/d/actions-build.Dockerfile \
|
||||
--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:
|
||||
|
||||
npm-push:
|
||||
push-npm:
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
# 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:
|
||||
|
||||
s3-push:
|
||||
push-s3:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- id: get-id
|
||||
@ -37,9 +37,10 @@ jobs:
|
||||
username: ${{ secrets.docker_repo2_username }}
|
||||
password: ${{ secrets.docker_repo2_password }}
|
||||
|
||||
- name: Build the container image
|
||||
- name: Build the container image for bundle step
|
||||
run: |
|
||||
docker build \
|
||||
--build-arg BUILD_STEP=bundle \
|
||||
--build-arg PUBLIC_BUILD_VERSION=${{ steps.get-id.outputs.BUILD_ID }} \
|
||||
--file fab/d/actions-build.Dockerfile \
|
||||
--tag ${{ steps.get-id.outputs.DOCKER_IMAGE }} \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user