-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'intelops:main' into main
- Loading branch information
Showing
25 changed files
with
1,130 additions
and
74 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,79 @@ | ||
name: Migration Docker Image CI | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
id-token: write | ||
contents: read | ||
actions: read | ||
security-events: write | ||
env: | ||
REGISTRY: ghcr.io | ||
GH_URL: https://github.com | ||
steps: | ||
- name: Checkout GitHub Action | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Docker metadata | ||
id: metadata | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ github.repository }}/migration | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=raw,value={{sha}},enable=${{ github.ref_type != 'tag' }} | ||
flavor: | | ||
latest=true | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build image and push to GitHub Container Registry | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: ./dockerfiles/migration/Dockerfile | ||
tags: ${{ env.REGISTRY }}/${{ github.repository }}/migration:${{ github.run_id }} | ||
labels: ${{ steps.metadata.outputs.labels }} | ||
push: true | ||
|
||
- name: Install cosign | ||
uses: sigstore/cosign-installer@main | ||
|
||
- name: Sign the images | ||
run: | | ||
cosign sign -y ${{ env.REGISTRY }}/${{ github.repository }}/migration:${{ github.run_id }} | ||
env: | ||
COSIGN_EXPERIMENTAL: 1 | ||
|
||
- name: Verify the pushed tags | ||
run: cosign verify ${{ env.REGISTRY }}/${{ github.repository }}/migration:${{ github.run_id }} --certificate-identity ${{ env.GH_URL }}/${{ github.repository }}/.github/workflows/migration-image.yml@refs/heads/main --certificate-oidc-issuer https://token.actions.githubusercontent.com | ||
env: | ||
COSIGN_EXPERIMENTAL: 1 | ||
|
||
- name: Run Trivy in GitHub SBOM mode and submit results to Dependency Graph | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
scan-type: 'fs' | ||
format: 'github' | ||
output: 'dependency-results.sbom.json' | ||
image-ref: '.' | ||
github-pat: ${{ secrets.GITHUB_TOKEN }} |
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,47 @@ | ||
name: Migration Docker Image CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
REGISTRY: ghcr.io | ||
GH_URL: https://github.com | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- | ||
name: Login to ghcr registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- | ||
name: Build and push on PR | ||
uses: docker/build-push-action@v4 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
context: . | ||
file: ./dockerfiles/migration/Dockerfile | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ github.repository }}/migration:pr-${{ github.event.pull_request.number }} | ||
build-args: | | ||
"GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" |
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,60 @@ | ||
name: migration-release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Build and push Docker image to GitHub container registry. | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
packages: write | ||
id-token: write | ||
contents: read | ||
actions: read | ||
security-events: write | ||
env: | ||
REGISTRY: ghcr.io | ||
GH_URL: https://github.com | ||
steps: | ||
- name: Set environment variable | ||
run: | | ||
echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV | ||
- name: Test environment variable | ||
run: echo ${{ env.RELEASE_VERSION }} | ||
- name: Check out GitHub repo | ||
uses: actions/checkout@v3 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build image and push to GitHub Container Registry | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: true | ||
context: ./ | ||
file: ./dockerfiles/migration/Dockerfile | ||
tags: ${{ env.REGISTRY }}/${{ github.repository }}/migration:${{ env.RELEASE_VERSION }} | ||
- name: Install cosign | ||
uses: sigstore/cosign-installer@main | ||
- name: Sign the images | ||
run: | | ||
cosign sign -y ${{ env.REGISTRY }}/${{ github.repository }}/migration:${{ env.RELEASE_VERSION }} | ||
env: | ||
COSIGN_EXPERIMENTAL: 1 | ||
- name: Verify the pushed tags | ||
run: cosign verify ${{ env.REGISTRY }}/${{ github.repository }}/migration:${{ env.RELEASE_VERSION }} --certificate-identity ${{ env.GH_URL }}/${{ github.repository }}/.github/workflows/migration-release.yml@refs/tags/${{ env.RELEASE_VERSION }} --certificate-oidc-issuer https://token.actions.githubusercontent.com | ||
env: | ||
COSIGN_EXPERIMENTAL: 1 | ||
- name: Run Trivy in GitHub SBOM mode and submit results to Dependency Graph | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
scan-type: 'fs' | ||
format: 'github' | ||
output: 'dependency-results.sbom.json' | ||
image-ref: '.' | ||
github-pat: ${{ secrets.GITHUB_TOKEN }} |
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,2 +1,5 @@ | ||
civo | ||
migration/ | ||
alloc.svg | ||
allocs.pprof | ||
cpu.pprof | ||
steps-to-test.txt |
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
Oops, something went wrong.