|
| 1 | +--- |
| 2 | +name: actions-smoke-test |
| 3 | + |
| 4 | +on: |
| 5 | + workflow_dispatch: |
| 6 | + pull_request: |
| 7 | + paths: |
| 8 | + - .github/workflows/pr_actions-smoke-test.yml |
| 9 | + - build-container-image/action.yml |
| 10 | + - build-product-image/action.yml |
| 11 | + - publish-image/action.yml |
| 12 | + - publish-index-manifest/action.yml |
| 13 | + - shard/action.yml |
| 14 | + - smoke/* |
| 15 | + |
| 16 | +jobs: |
| 17 | + generate_matrix: |
| 18 | + name: Generate Version List |
| 19 | + runs-on: ubuntu-latest |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 |
| 22 | + - id: shard |
| 23 | + uses: ./shard |
| 24 | + with: |
| 25 | + product-name: smoke |
| 26 | + config-file: smoke/conf.py |
| 27 | + outputs: |
| 28 | + versions: ${{ steps.shard.outputs.versions }} |
| 29 | + |
| 30 | + build: |
| 31 | + name: Build/Publish Smoke Test (${{ matrix.versions }}-${{ matrix.runner.arch }}) Image |
| 32 | + needs: [generate_matrix] |
| 33 | + permissions: |
| 34 | + id-token: write |
| 35 | + runs-on: ${{ matrix.runner.name }} |
| 36 | + strategy: |
| 37 | + matrix: |
| 38 | + runner: |
| 39 | + - {name: "ubuntu-latest", arch: "amd64"} |
| 40 | + - {name: "ubicloud-standard-8-arm", arch: "arm64"} |
| 41 | + versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} |
| 42 | + steps: |
| 43 | + - name: Checkout Repository |
| 44 | + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 |
| 45 | + |
| 46 | + - name: Build Product Container Image |
| 47 | + id: build |
| 48 | + uses: ./build-product-image |
| 49 | + with: |
| 50 | + product-name: smoke |
| 51 | + product-version: ${{ matrix.versions }} |
| 52 | + build-cache-password: ${{ secrets.BUILD_CACHE_NEXUS_PASSWORD }} |
| 53 | + bake-config-file: smoke/conf.py |
| 54 | + |
| 55 | + - name: Publish Container Image on oci.stackable.tech |
| 56 | + uses: ./publish-image |
| 57 | + with: |
| 58 | + image-registry-uri: oci.stackable.tech |
| 59 | + image-registry-username: robot$stackable+github-action-build |
| 60 | + image-registry-password: ${{ secrets.HARBOR_ROBOT_STACKABLE_GITHUB_ACTION_BUILD_SECRET }} |
| 61 | + image-repository: stackable/smoke |
| 62 | + image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} |
| 63 | + source-image-uri: localhost/smoke:${{ steps.build.outputs.image-manifest-tag }} |
| 64 | + |
| 65 | + publish_manifests: |
| 66 | + name: Build/Publish ${{ matrix.versions }} Index Manifest |
| 67 | + needs: [generate_matrix, build] |
| 68 | + permissions: |
| 69 | + id-token: write |
| 70 | + runs-on: ubuntu-latest |
| 71 | + strategy: |
| 72 | + matrix: |
| 73 | + versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} |
| 74 | + steps: |
| 75 | + - name: Checkout Repository |
| 76 | + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 |
| 77 | + |
| 78 | + - name: Publish and Sign Image Index Manifest to oci.stackable.tech |
| 79 | + uses: ./publish-index-manifest |
| 80 | + with: |
| 81 | + image-registry-uri: oci.stackable.tech |
| 82 | + image-registry-username: robot$stackable+github-action-build |
| 83 | + image-registry-password: ${{ secrets.HARBOR_ROBOT_STACKABLE_GITHUB_ACTION_BUILD_SECRET }} |
| 84 | + image-repository: stackable/smoke |
| 85 | + image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev |
0 commit comments