-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit cc321c4
Showing
3 changed files
with
69 additions
and
0 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,57 @@ | ||
name: docker | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository_owner }}/litmus-node-fault | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- id: docker_meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
- id: docker_build | ||
name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ${{ steps.docker_meta.outputs.tags }} | ||
labels: ${{ steps.docker_meta.outputs.labels }} | ||
|
||
- name: Install Cosign | ||
uses: sigstore/cosign-installer@main | ||
|
||
- name: Sign image with a key | ||
run: | | ||
cosign sign --key env://COSIGN_PRIVATE_KEY ${IMAGE_NAME,,}@${IMAGE_DIGEST} --yes | ||
env: | ||
IMAGE_NAME: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} | ||
IMAGE_DIGEST: ${{ steps.docker_build.outputs.digest }} | ||
COSIGN_PRIVATE_KEY: ${{secrets.COSIGN_PRIVATE_KEY}} | ||
COSIGN_PASSWORD: ${{secrets.COSIGN_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,8 @@ | ||
FROM alpine:latest | ||
|
||
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | ||
RUN chmod +x kubectl | ||
RUN mv ./kubectl /usr/local/bin/ | ||
RUN curl -LO https://github.com/kvaps/kubectl-node-shell/raw/master/kubectl-node_shell | ||
RUN chmod +x ./kubectl-node_shell | ||
RUN mv ./kubectl-node_shell /usr/local/bin/kubectl-node_shell |
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,4 @@ | ||
-----BEGIN PUBLIC KEY----- | ||
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEecYo6AqKFTb9su1Kcodys3hvO+Fl | ||
3R/vJCyD8/aQR39T+251p/4qCAsjsb4EJ/fWD5rbnilgBCbTIyIARVz7jQ== | ||
-----END PUBLIC KEY----- |