-
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.
- Loading branch information
Showing
7 changed files
with
133 additions
and
149 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,53 @@ | ||
name: 'Build and push a custom image with apko' | ||
description: 'Composite action for building and pushing a custom image with apko' | ||
inputs: | ||
context: | ||
description: 'Path to the context directory' | ||
required: true | ||
|
||
component: | ||
description: 'Name of the component (e.g. kotsadm, kurl-proxy, etc...)' | ||
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: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: ${{ inputs.component }}-melange-packages-* | ||
path: ./packages/ | ||
merge-multiple: true | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: ${{ inputs.component }}-melange-rsa-pub-* | ||
merge-multiple: true | ||
|
||
- name: template apko config | ||
shell: bash | ||
run: | | ||
export GIT_TAG=${{ inputs.git-tag }} | ||
envsubst '${GIT_TAG}' < ${{ inputs.context }}/apko.yaml.tmpl > ${{ inputs.context }}/apko.yaml | ||
- uses: chainguard-images/actions/apko-publish@main | ||
with: | ||
config: ${{ inputs.context }}/apko.yaml | ||
archs: amd64,arm64 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: 'Build a custom melange package' | ||
description: 'Composite action for building a custom melange package' | ||
inputs: | ||
context: | ||
description: 'Path to the context directory' | ||
required: true | ||
|
||
component: | ||
description: 'Name of the component (e.g. kotsadm, kurl-proxy, etc...)' | ||
required: true | ||
|
||
git-tag: | ||
description: 'Git tag' | ||
required: true | ||
|
||
arch: | ||
description: 'Architecture to build for' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- id: cache-dir | ||
shell: bash | ||
run: echo "cache_dir=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT" | ||
|
||
- name: configure packages for arm64 | ||
if: inputs.arch == 'arm64' | ||
shell: bash | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install -y curl gettext-base pkg-config | ||
- name: template melange config | ||
shell: bash | ||
run: | | ||
export GIT_TAG=${{ inputs.git-tag }} | ||
envsubst '${GIT_TAG}' < ${{ inputs.context }}/melange.yaml.tmpl > ${{ inputs.context }}/melange.yaml | ||
- uses: chainguard-dev/actions/melange-build@main | ||
with: | ||
config: ${{ inputs.context }}/melange.yaml | ||
archs: ${{ inputs.arch }} | ||
sign-with-temporary-key: true | ||
cache-dir: ${{ steps.cache-dir.outputs.cache_dir }} | ||
|
||
# these artifacts are generated by melange-build | ||
|
||
- name: rename melange.rsa.pub | ||
shell: bash | ||
run: mv melange.rsa.pub melange-${{ inputs.arch }}.rsa.pub | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.component }}-melange-packages-${{ inputs.arch }} | ||
path: ./packages | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.component }}-melange-rsa-pub-${{ inputs.arch }} | ||
path: ./melange-${{ inputs.arch }}.rsa.pub |
4 changes: 2 additions & 2 deletions
4
...ons/build-push-image-with-apko/action.yml → ...ions/build-dep-image-with-apko/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
This file was deleted.
Oops, something went wrong.
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