-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into siva/sc-93559/wrong-data-in-field-customer-l…
…ast-active
- Loading branch information
Showing
62 changed files
with
1,068 additions
and
404 deletions.
There are no files selected for viewing
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,45 @@ | ||
name: 'Build and push images with apko' | ||
description: 'Composite action for building and pushing images with apko' | ||
inputs: | ||
apko-config: | ||
description: 'Path to apko config' | ||
required: true | ||
|
||
image-name: | ||
description: 'Full destination image name' | ||
required: true | ||
|
||
registry-username: | ||
description: 'Username to login to registry' | ||
default: '' | ||
required: false | ||
|
||
registry-password: | ||
description: 'Password to login to registry' | ||
default: '' | ||
required: false | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- id: check-image-exists | ||
shell: bash | ||
run: | | ||
set -euo pipefail | ||
if docker manifest inspect ${{ inputs.image-name }} > /dev/null 2>&1; then | ||
echo "Image already exists. Will not overwrite." | ||
echo "image-exists=true" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "Image does not exist. Will build and push." | ||
echo "image-exists=false" >> "$GITHUB_OUTPUT" | ||
fi | ||
- uses: chainguard-images/actions/apko-publish@main | ||
if: ${{ steps.check-image-exists.outputs.image-exists == 'false' }} | ||
with: | ||
config: ${{ inputs.apko-config }} | ||
archs: x86_64 | ||
tag: ${{ inputs.image-name }} | ||
vcs-url: true | ||
generic-user: ${{ inputs.registry-username }} | ||
generic-pass: ${{ inputs.registry-password }} |
62 changes: 62 additions & 0 deletions
62
.github/actions/build-push-kotsadm-migrations-image/action.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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: 'Build and push kotsadm-migrations image' | ||
description: 'Composite action for building and pushing kotsadm-migrations image' | ||
inputs: | ||
image-name: | ||
description: 'Full destination kotsadm-migrations image name' | ||
required: true | ||
|
||
git-tag: | ||
description: 'Git tag' | ||
required: true | ||
|
||
registry-username: | ||
description: 'Username to login to registry' | ||
default: '' | ||
required: false | ||
|
||
registry-password: | ||
description: 'Password to login to registry' | ||
default: '' | ||
required: false | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: load environment variables from .image.env | ||
uses: falti/dotenv-action@v1 | ||
id: dotenv | ||
with: | ||
path: .image.env | ||
|
||
- uses: shrink/actions-docker-extract@v3 | ||
with: | ||
image: schemahero/schemahero:${{ steps.dotenv.outputs.SCHEMAHERO_TAG }} | ||
path: /schemahero | ||
destination: migrations | ||
|
||
- name: template melange and apko configs | ||
shell: bash | ||
run: | | ||
export GIT_TAG=${{ inputs.git-tag }} | ||
envsubst '${GIT_TAG}' < migrations/deploy/melange.yaml.tmpl > migrations/deploy/melange.yaml | ||
envsubst '${GIT_TAG}' < migrations/deploy/apko.yaml.tmpl > migrations/deploy/apko.yaml | ||
- id: cache-dir | ||
shell: bash | ||
run: echo "cache_dir=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT" | ||
|
||
- uses: chainguard-dev/actions/melange-build@main | ||
with: | ||
config: migrations/deploy/melange.yaml | ||
archs: x86_64 | ||
sign-with-temporary-key: true | ||
cache-dir: ${{ steps.cache-dir.outputs.cache_dir }} | ||
|
||
- uses: chainguard-images/actions/apko-publish@main | ||
with: | ||
config: migrations/deploy/apko.yaml | ||
archs: x86_64 | ||
tag: ${{ inputs.image-name }} | ||
vcs-url: true | ||
generic-user: ${{ inputs.registry-username }} | ||
generic-pass: ${{ inputs.registry-password }} |
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
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
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
Oops, something went wrong.