Skip to content

Commit

Permalink
pkg/turbooci: functionality done
Browse files Browse the repository at this point in the history
Signed-off-by: zhuangbowei.zbw <[email protected]>
  • Loading branch information
WaberZhuang committed Jan 11, 2024
1 parent abd058d commit 76c54e5
Show file tree
Hide file tree
Showing 17 changed files with 1,904 additions and 42 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci-basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ on:
image-tag:
required: true
type: string
github-repository:
required: true
type: string

jobs:
run-ci-basic:
name: Run CI | Basic
runs-on: ubuntu-22.04
timeout-minutes: 10
container:
image: ghcr.io/${{ github.repository }}/overlaybd-ci-images:${{ inputs.image-tag }}
image: ghcr.io/${{ inputs.github-repository }}/overlaybd-ci-images:${{ inputs.image-tag }}
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ci-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
image-tag:
required: true
type: string
github-repository:
required: true
type: string

env:
GO_VERSION: "1.19"
Expand Down Expand Up @@ -51,7 +54,7 @@ jobs:
- name: Build and Push
uses: docker/build-push-action@v4
with:
tags: ghcr.io/${{ github.repository }}/overlaybd-ci-images:${{ inputs.image-tag }}
tags: ghcr.io/${{ inputs.github-repository }}/overlaybd-ci-images:${{ inputs.image-tag }}
push: true
context: .
platforms: linux/amd64
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
image-tag:
required: true
type: string
github-repository:
required: true
type: string

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -19,13 +22,15 @@ jobs:
with:
commit-hash: ${{ inputs.commit-hash }}
image-tag: ${{ inputs.image-tag }}
github-repository: ${{ inputs.github-repository }}
secrets: inherit

run-ci-basic:
needs: build-test-image-amd64
uses: ./.github/workflows/ci-basic.yml
with:
image-tag: ${{ inputs.image-tag }}
github-repository: ${{ inputs.github-repository }}
secrets: inherit

run-ci-userspace-convertor:
Expand All @@ -34,4 +39,5 @@ jobs:
with:
commit-hash: ${{ inputs.commit-hash }}
image-tag: ${{ inputs.image-tag }}
github-repository: ${{ inputs.github-repository }}
secrets: inherit
5 changes: 4 additions & 1 deletion .github/workflows/ci-userspace-convertor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ on:
image-tag:
required: true
type: string
github-repository:
required: true
type: string

jobs:
run-ci-userspace-convertor:
name: Run CI | Userspace Convertor
runs-on: ubuntu-22.04
timeout-minutes: 10
container:
image: ghcr.io/${{ github.repository }}/overlaybd-ci-images:${{ inputs.image-tag }}
image: ghcr.io/${{ inputs.github-repository }}/overlaybd-ci-images:${{ inputs.image-tag }}
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,25 @@ jobs:
run: |
sudo GO_TESTFLAGS=-v make test
lower-repo:
name: Lower Repo
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
repository: ${{ steps.lowercase_repository.outputs.repository }}
steps:
- id: lowercase_repository
run: |
echo "GITHUB_REPOSITORY=${{ github.repository }}"
echo "::set-output name=repository::${GITHUB_REPOSITORY,,}"
e2e-test:
needs: lower-repo
name: E2E Test
if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') || github.event_name == 'push' }}
uses: ./.github/workflows/ci-e2e.yml
with:
commit-hash: ${{ github.event.pull_request.head.sha || github.sha }}
image-tag: ${{ github.event.pull_request.number || 'default' }}
github-repository: ${{ needs.lower-repo.outputs.repository }}
secrets: inherit
Loading

0 comments on commit 76c54e5

Please sign in to comment.