Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old arc #181

Merged
merged 8 commits into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 6 additions & 102 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,74 +6,7 @@ on:
types: [published] # build on release

jobs:
build-ubuntu:
runs-on: ubuntu-latest # use the GitHub hosted runners
permissions:
contents: write # for uploading the SBOM to the release
packages: write # for uploading the finished container
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
id-token: write # to complete the identity challenge with sigstore/fulcio when running outside of PRs
strategy:
matrix:
runner-image: [ubuntu-focal, rootless-ubuntu-focal, ubuntu-jammy]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set version
run: echo "VERSION=$(cat ${GITHUB_EVENT_PATH} | jq -r '.release.tag_name')" >> $GITHUB_ENV

- name: Set short SHA
run: echo "SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push the image
uses: docker/build-push-action@v4
id: build-and-push
with:
file: "images/${{ matrix.runner-image }}.Dockerfile"
push: true
tags: |
ghcr.io/some-natalie/kubernoodles/${{ matrix.runner-image }}:latest
ghcr.io/some-natalie/kubernoodles/${{ matrix.runner-image }}:${{ env.VERSION }}
ghcr.io/some-natalie/kubernoodles/${{ matrix.runner-image }}:${{ env.VERSION }}-${{ env.SHA_SHORT }}

- name: Run Anchore scan
uses: anchore/scan-action@v3
id: scan
with:
image: "ghcr.io/some-natalie/kubernoodles/${{ matrix.runner-image }}:${{ env.VERSION }}"
fail-build: false

- name: Upload Anchore scan report
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.scan.outputs.sarif }}

- name: Generate SBOM for the Ubuntu-based runners
uses: anchore/sbom-action@v0
with:
image: ghcr.io/some-natalie/kubernoodles/${{ matrix.runner-image }}:${{ env.VERSION }}-${{ env.SHA_SHORT }}

- name: Install cosign
uses: sigstore/cosign-installer@main

- name: Sign the published Docker image
env:
COSIGN_EXPERIMENTAL: "true"
run: cosign sign ghcr.io/some-natalie/kubernoodles/${{ matrix.runner-image }}@${{ steps.build-and-push.outputs.digest }}

build-podman:
build-ubi8:
runs-on: ubuntu-latest # use the GitHub hosted runners
permissions:
contents: write # for uploading the SBOM to the release
Expand All @@ -95,9 +28,9 @@ jobs:
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ghcr.io/some-natalie/kubernoodles/podman
image: ghcr.io/some-natalie/kubernoodles/ubi8
tags: latest ${{ env.VERSION }} ${{ env.VERSION }}-${{ env.SHA_SHORT }}
containerfiles: images/podman.Dockerfile
containerfiles: images/ubi8.Dockerfile

- name: Push image
uses: redhat-actions/push-to-registry@v2
Expand All @@ -113,7 +46,7 @@ jobs:
uses: anchore/scan-action@v3
id: scan
with:
image: "ghcr.io/some-natalie/kubernoodles/podman:${{ env.VERSION }}"
image: "ghcr.io/some-natalie/kubernoodles/ubi8:${{ env.VERSION }}"
fail-build: false

- name: Upload Anchore scan report
Expand All @@ -124,7 +57,7 @@ jobs:
- name: Generate SBOM for the Podman (Fedora 37) runner
uses: anchore/sbom-action@v0
with:
image: ghcr.io/some-natalie/kubernoodles/podman:${{ env.VERSION }}-${{ env.SHA_SHORT }}
image: ghcr.io/some-natalie/kubernoodles/ubi8:${{ env.VERSION }}-${{ env.SHA_SHORT }}

- name: Get image digest
run: echo "IMAGE_DIGEST=$(cat digest.txt)" >> $GITHUB_ENV
Expand All @@ -138,33 +71,4 @@ jobs:
- name: Sign the published Docker image
env:
COSIGN_EXPERIMENTAL: "true"
run: cosign sign ghcr.io/some-natalie/kubernoodles/podman@${{ env.IMAGE_DIGEST }}

deploy:
runs-on: ubuntu-latest # use the GitHub hosted runners to deploy the self-hosted runners in GHEC
# If using GHES or GHAE, use another deployment, such as having CentOS redeploy Ubuntu and vice versa
environment: production
needs: [build-podman, build-ubuntu]
strategy:
matrix:
runner-image:
[podman, ubuntu-focal, rootless-ubuntu-focal, ubuntu-jammy]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Write out the kubeconfig info
run: |
echo ${{ secrets.DEPLOY_ACCOUNT }} | base64 -d > /tmp/config

- name: Update deployments
run: |
kubectl delete -f deployments/${{ matrix.runner-image }}.yml
sleep 30
kubectl apply -f deployments/${{ matrix.runner-image }}.yml
env:
KUBECONFIG: /tmp/config

- name: Remove kubeconfig info
run: rm -f /tmp/config
run: cosign sign ghcr.io/some-natalie/kubernoodles/ubi8@${{ env.IMAGE_DIGEST }}
115 changes: 0 additions & 115 deletions .github/workflows/test-podman.yml

This file was deleted.

130 changes: 0 additions & 130 deletions .github/workflows/test-rootless-ubuntu-focal.yml

This file was deleted.

Loading