fix(tenant-2): use host_port in cross_node_links #15
Workflow file for this run
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: Build rootfs images | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| validate-config: | |
| # Validate the GitOps runtime config with the exact Firework enricher before | |
| # any expensive image build. Pin FIREWORK_CONFIG_REF to the core version | |
| # deployed to the nodes; do not validate against a floating main. | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout GitOps config | |
| uses: actions/checkout@v4 | |
| - name: Checkout Firework (pinned config contract) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: artemnikitin/firework | |
| ref: ${{ vars.FIREWORK_CONFIG_REF || 'be5c449ec546505cf03ca50a7118422a6139ee75' }} | |
| path: .firework | |
| token: ${{ secrets.FIREWORK_GITHUB_TOKEN || github.token }} | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: .firework/go.mod | |
| - name: Validate runtime config | |
| working-directory: .firework | |
| run: go run ./cmd/configcheck --require-remote-routing --input-dir "$GITHUB_WORKSPACE" | |
| build: | |
| needs: validate-config | |
| permissions: | |
| contents: read | |
| id-token: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target_platform: linux/arm64 | |
| target_arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| yq_arch: arm64 | |
| - target_platform: linux/amd64 | |
| target_arch: amd64 | |
| runner: ubuntu-24.04 | |
| yq_arch: amd64 | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25.x" | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y -qq jq e2fsprogs | |
| - name: Install yq | |
| run: | | |
| sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_${{ matrix.yq_arch }} | |
| sudo chmod +x /usr/local/bin/yq | |
| - name: Build per-tenant rootfs images (${{ matrix.target_platform }}) | |
| env: | |
| TARGET_PLATFORM: ${{ matrix.target_platform }} | |
| FC_INIT_VERSION: ${{ vars.FC_INIT_VERSION }} | |
| FIREWORK_GITHUB_TOKEN: ${{ secrets.FIREWORK_GITHUB_TOKEN }} | |
| run: make build | |
| - name: Resolve upload buckets | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| env: | |
| S3_IMAGES_BUCKET: ${{ vars.S3_IMAGES_BUCKET }} | |
| S3_IMAGES_BUCKET_ARM64: ${{ vars.S3_IMAGES_BUCKET_ARM64 }} | |
| S3_IMAGES_BUCKET_AMD64: ${{ vars.S3_IMAGES_BUCKET_AMD64 }} | |
| GCS_IMAGES_BUCKET: ${{ vars.GCS_IMAGES_BUCKET }} | |
| GCS_IMAGES_BUCKET_ARM64: ${{ vars.GCS_IMAGES_BUCKET_ARM64 }} | |
| GCS_IMAGES_BUCKET_AMD64: ${{ vars.GCS_IMAGES_BUCKET_AMD64 }} | |
| run: | | |
| case "${{ matrix.target_arch }}" in | |
| arm64) | |
| echo "S3_IMAGES_BUCKET=${S3_IMAGES_BUCKET_ARM64:-${S3_IMAGES_BUCKET:-}}" >> "$GITHUB_ENV" | |
| echo "GCS_IMAGES_BUCKET=${GCS_IMAGES_BUCKET_ARM64:-}" >> "$GITHUB_ENV" | |
| ;; | |
| amd64) | |
| echo "S3_IMAGES_BUCKET=${S3_IMAGES_BUCKET_AMD64:-}" >> "$GITHUB_ENV" | |
| echo "GCS_IMAGES_BUCKET=${GCS_IMAGES_BUCKET_AMD64:-${GCS_IMAGES_BUCKET:-}}" >> "$GITHUB_ENV" | |
| ;; | |
| esac | |
| - name: Upload images to S3 | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_REGION: ${{ vars.AWS_REGION }} | |
| run: | | |
| if [ -z "${S3_IMAGES_BUCKET:-}" ]; then | |
| echo "Skipping S3 upload for ${{ matrix.target_platform }}; no bucket configured" | |
| exit 0 | |
| fi | |
| make push-s3 | |
| - name: Authenticate to GCP | |
| if: >- | |
| github.event_name == 'push' && | |
| github.ref == 'refs/heads/main' && | |
| ( | |
| (matrix.target_arch == 'arm64' && vars.GCS_IMAGES_BUCKET_ARM64 != '') || | |
| (matrix.target_arch == 'amd64' && (vars.GCS_IMAGES_BUCKET_AMD64 != '' || vars.GCS_IMAGES_BUCKET != '')) | |
| ) | |
| uses: google-github-actions/auth@v3 | |
| with: | |
| workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} | |
| service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }} | |
| project_id: ${{ secrets.GCP_PROJECT_ID }} | |
| - name: Upload images to GCS | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| run: | | |
| if [ -z "${GCS_IMAGES_BUCKET:-}" ]; then | |
| echo "Skipping GCS upload for ${{ matrix.target_platform }}; no bucket configured" | |
| exit 0 | |
| fi | |
| make push-gcs |