[scorpio]:fix issue #1534 where a temporary mount point was incorrect… #25
This file contains hidden or 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
| name: Orion Client Image deploy | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - ".github/workflows/orion-client-image-deploy.yml" | |
| - "orion/Dockerfile" | |
| - "orion/entrypoint.sh" | |
| - "orion/scorpio.toml.template" | |
| - "orion/**" | |
| - "scorpio/**" | |
| - "ceres/**" | |
| - "jupiter/**" | |
| - "common/**" | |
| - "context/**" | |
| permissions: | |
| id-token: write | |
| contents: read | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.ref }}" | |
| cancel-in-progress: true | |
| env: | |
| REGISTRY_ALIAS: m8q5m4u3 | |
| REPOSITORY: mega | |
| IMAGE_TAG_BASE: orion-client-0.1.0-pre-release | |
| jobs: | |
| build-push-single-arch: | |
| if: ${{ github.repository == 'web3infra-foundation/mega' }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| platform: [linux/amd64] | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-1 | |
| - name: Login to Amazon ECR Public | |
| id: login-ecr-public | |
| uses: aws-actions/amazon-ecr-login@v2 | |
| with: | |
| registry-type: public | |
| - name: Build & push ${{ matrix.platform }} image | |
| env: | |
| REGISTRY: ${{ steps.login-ecr-public.outputs.registry }} | |
| PLATFORM: ${{ matrix.platform }} | |
| run: | | |
| set -euo pipefail | |
| IMAGE_BASE="$REGISTRY/${{ env.REGISTRY_ALIAS }}/${{ env.REPOSITORY }}" | |
| ARCH_SUFFIX=$(echo "$PLATFORM" | awk -F'/' '{print $2}') | |
| docker buildx build \ | |
| --platform "$PLATFORM" \ | |
| --target runtime \ | |
| --provenance=false \ | |
| --sbom=false \ | |
| -t "$IMAGE_BASE:${{ env.IMAGE_TAG_BASE }}-$ARCH_SUFFIX" \ | |
| -f orion/Dockerfile \ | |
| --push . | |
| manifest: | |
| needs: build-push-single-arch | |
| runs-on: ubuntu-latest | |
| if: ${{ github.repository == 'web3infra-foundation/mega' }} | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-1 | |
| - name: Login to Amazon ECR Public | |
| id: login-ecr-public | |
| uses: aws-actions/amazon-ecr-login@v2 | |
| with: | |
| registry-type: public | |
| - name: Create & push manifest | |
| env: | |
| REGISTRY: ${{ steps.login-ecr-public.outputs.registry }} | |
| run: | | |
| set -euo pipefail | |
| IMAGE_BASE="$REGISTRY/${{ env.REGISTRY_ALIAS }}/${{ env.REPOSITORY }}" | |
| docker manifest create "$IMAGE_BASE:${{ env.IMAGE_TAG_BASE }}" \ | |
| "$IMAGE_BASE:${{ env.IMAGE_TAG_BASE }}-amd64" \ | |
| "$IMAGE_BASE:${{ env.IMAGE_TAG_BASE }}-arm64" | |
| docker manifest push "$IMAGE_BASE:${{ env.IMAGE_TAG_BASE }}" |