|
12 | 12 |
|
13 | 13 | jobs:
|
14 | 14 | Build:
|
15 |
| - runs-on: ubuntu-20.04 |
| 15 | + runs-on: ubuntu-22.04 |
16 | 16 | steps:
|
17 | 17 | - uses: actions/checkout@v2
|
18 | 18 | - name: Docker meta for KubeSphere
|
|
29 | 29 | type=ref,event=pr
|
30 | 30 | type=semver,pattern={{raw}}
|
31 | 31 | type=sha
|
32 |
| - - name: Docker meta for Contributors |
33 |
| - id: metaContributors |
34 |
| - if: github.repository_owner != 'kubesphere' |
35 |
| - uses: docker/metadata-action@v3 |
36 |
| - with: |
37 |
| - images: | |
38 |
| - ghcr.io/${{ github.repository_owner }}/s2irun |
39 |
| - tags: | |
40 |
| - type=schedule |
41 |
| - type=ref,event=branch |
42 |
| - type=ref,event=pr |
43 |
| - type=semver,pattern={{raw}} |
44 |
| - type=sha |
45 | 32 | - name: Set up QEMU
|
46 | 33 | uses: docker/setup-qemu-action@v1
|
47 | 34 | - name: Set up Docker Buildx
|
|
52 | 39 | with:
|
53 | 40 | username: ${{ secrets.DOCKER_HUB_USER }}
|
54 | 41 | password: ${{ secrets.DOCKER_HUB_SECRETS }}
|
55 |
| - - name: Login to GHCR |
56 |
| - if: github.event_name != 'pull_request' |
57 |
| - uses: docker/login-action@v1 |
58 |
| - with: |
59 |
| - registry: ghcr.io |
60 |
| - username: ${{ github.repository_owner }} |
61 |
| - password: ${{ secrets.GHCR_TOKEN }} |
62 | 42 | - name: Build env
|
63 | 43 | id: build_env
|
64 | 44 | run: |
|
|
84 | 64 | load: ${{ steps.build_env.outputs.load }}
|
85 | 65 | labels: ${{ steps.meta.outputs.labels }}
|
86 | 66 | platforms: ${{ steps.build_env.outputs.platforms }}
|
87 |
| - - name: Build and push Docker images for Contributors |
88 |
| - |
89 |
| - if: github.repository_owner != 'kubesphere' |
90 |
| - with: |
91 |
| - context: . |
92 |
| - file: Dockerfile |
93 |
| - tags: ${{ steps.metaContributors.outputs.tags }} |
94 |
| - push: ${{ steps.build_env.outputs.push }} |
95 |
| - load: ${{ steps.build_env.outputs.load }} |
96 |
| - labels: ${{ steps.metaContributors.outputs.labels }} |
97 |
| - platforms: ${{ steps.build_env.outputs.platforms }} |
98 | 67 | - name: Run Trivy vulnerability scanner
|
99 | 68 | uses: aquasecurity/[email protected]
|
100 | 69 | if: github.event_name == 'pull_request'
|
|
0 commit comments