-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* updates to kubectl-shell Dockerfile * cleanup * cleanup task names * docker scout action * updating workflow
- Loading branch information
Showing
6 changed files
with
99 additions
and
94 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 |
---|---|---|
@@ -1,12 +1,16 @@ | ||
name: "base" | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * *" # 00:00 UTC Everyday | ||
workflow_dispatch: | ||
|
||
env: | ||
DOCKER_HUB_REPO: portainer/base | ||
IMAGE_TAG: latest | ||
|
||
jobs: | ||
base-ci: | ||
build_images: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "[preparation] checkout" | ||
|
@@ -31,11 +35,11 @@ jobs: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
|
||
- name: Build and push | ||
- name: "build and push images" | ||
uses: docker/[email protected] | ||
with: | ||
context: base/ | ||
tags: portainer/base:latest | ||
tags: ${{ env.DOCKER_HUB_REPO }}:${{ env.IMAGE_TAG }} | ||
platforms: | | ||
linux/amd64 | ||
linux/arm64 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: "kubectl-shell" | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- develop | ||
paths: | ||
- 'kube-shell/**' | ||
pull_request: | ||
branches: | ||
- develop | ||
paths: | ||
- 'kube-shell/**' | ||
|
||
env: | ||
DOCKER_HUB_REPO: portainerci/kubectl-shell | ||
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }} | ||
|
||
jobs: | ||
build_images: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "[preparation] checkout" | ||
uses: actions/[email protected] | ||
|
||
- name: "[preparation] set up qemu" | ||
uses: docker/[email protected] | ||
|
||
- name: "[preparation] set up docker context for buildx" | ||
run: docker context create builders | ||
|
||
- name: "[preparation] set up docker buildx" | ||
uses: docker/[email protected] | ||
with: | ||
endpoint: builders | ||
driver-opts: image=moby/buildkit:v0.16.0 | ||
platforms: linux/amd64,linux/arm64,linux/arm,linux/ppc64le | ||
|
||
- name: "[preparation] docker login" | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
|
||
- name: "set image tag for pull request" | ||
run: | | ||
echo "IMAGE_TAG=pr${{ github.event.pull_request.number }}" >> $GITHUB_ENV | ||
if: ${{ github.event_name == 'pull_request' }} | ||
|
||
- name: "set image tag for develop" | ||
run: | | ||
echo "IMAGE_TAG=latest" >> $GITHUB_ENV | ||
if: ${{ github.event_name == 'push' }} | ||
|
||
- name: "build and push images" | ||
uses: docker/[email protected] | ||
with: | ||
context: kubectl-shell/ | ||
tags: ${{ env.DOCKER_HUB_REPO }}:${{ env.IMAGE_TAG }} | ||
build-args: | | ||
KUBERNETES_RELEASE=v1.31.0 | ||
ALPINE=alpine:latest | ||
HELM_VERSION=v3.15.4 | ||
platforms: | | ||
linux/amd64 | ||
linux/arm64 | ||
linux/arm | ||
linux/ppc64le | ||
attests: | | ||
type=sbom,generator=docker/scout-sbom-indexer:latest | ||
type=provenance,mode=max | ||
push: true | ||
|
||
- name: "docker scout scan" | ||
id: docker-scout | ||
if: ${{ github.event_name == 'pull_request' }} | ||
uses: docker/scout-action@v1 | ||
with: | ||
command: cves | ||
image: ${{ env.DOCKER_HUB_REPO }}:${{ env.IMAGE_TAG }} | ||
to: portainer/base:latest | ||
ignore-unchanged: true | ||
only-severities: critical,high | ||
write-comment: true | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
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
File renamed without changes.