-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update github workflows to publish retina-shell image (#940)
# Description Update GitHub workflows to publish retina-shell image. ## Related Issue #910 ## Checklist - [x] I have read the [contributing documentation](https://retina.sh/docs/contributing). - [x] I signed and signed-off the commits (`git commit -S -s ...`). See [this documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) on signing commits. - [x] I have correctly attributed the author(s) of the code. - [x] I have tested the changes locally. - [x] I have followed the project's style guidelines. - [x] I have updated the documentation, if necessary. - [x] I have added tests, if applicable. ## Screenshots (if applicable) or Testing Completed <img width="550" alt="image" src="https://github.com/user-attachments/assets/cddac7c8-c4f6-4716-a3e0-9a1075c25e13"> ## Additional Notes N/A --- Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more information on how to contribute to this project. Signed-off-by: Will Daly <[email protected]>
- Loading branch information
Showing
2 changed files
with
101 additions
and
7 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
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 |
---|---|---|
|
@@ -150,14 +150,57 @@ jobs: | |
cosign sign --yes ${IMAGE_PATH}@${DIGEST} | ||
done | ||
retina-shell-images: | ||
name: Build Retina Shell Images | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
platform: ["linux"] | ||
arch: ["amd64", "arm64"] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- run: go version | ||
|
||
- name: Install Cosign | ||
uses: sigstore/[email protected] | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Log in to registry | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin | ||
|
||
- name: Build/Push Images | ||
shell: bash | ||
run: | | ||
set -euo pipefail | ||
echo "TAG=$(make version)" >> $GITHUB_ENV | ||
make retina-shell-image \ | ||
IMAGE_NAMESPACE=${{ github.repository }} \ | ||
PLATFORM=${{ matrix.platform }}/${{ matrix.arch }} \ | ||
BUILDX_ACTION=--push | ||
- name: Sign container image | ||
run: | | ||
IMAGE_PATH="ghcr.io/${{ github.repository }}/retina-shell:$TAG-${{ matrix.platform }}-${{ matrix.arch }}" | ||
DIGEST=$(jq -r '.["containerimage.digest"]' image-metadata-retina-shell-$TAG-${{ matrix.platform }}-${{ matrix.arch }}.json) | ||
cosign sign --yes ${IMAGE_PATH}@${DIGEST} | ||
manifests: | ||
name: Generate Manifests | ||
runs-on: ubuntu-latest | ||
needs: [retina-images, retina-win-images, operator-images] | ||
needs: [retina-images, retina-win-images, operator-images, retina-shell-images] | ||
|
||
strategy: | ||
matrix: | ||
component: ["retina", "operator"] | ||
component: ["retina", "operator", "shell"] | ||
|
||
steps: | ||
- name: Checkout code | ||
|
@@ -186,6 +229,8 @@ jobs: | |
images=("retina-agent" "retina-init") | ||
if [[ ${{ matrix.component }} == "operator" ]]; then | ||
images=("retina-operator") | ||
elif [[ ${{ matrix.component }} == "shell" ]]; then | ||
images=("retina-shell") | ||
fi | ||
for image in "${images[@]}"; do | ||
IMAGE_PATH="ghcr.io/${{ github.repository }}/$image:$TAG" | ||
|