Remove local build as that should be done via the custom FC repo duri… #36
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: FC Versions | |
| on: | |
| push: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| id-token: write | |
| contents: write | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Parse versions and resolve hashes | |
| id: set-matrix | |
| run: | | |
| versions_json=$(./scripts/parse-versions-with-hash.sh firecracker_versions.txt) | |
| echo "matrix=$versions_json" >> $GITHUB_OUTPUT | |
| build: | |
| needs: prepare | |
| uses: ./.github/workflows/build.yml | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: ${{ fromJson(needs.prepare.outputs.matrix) }} | |
| with: | |
| version: ${{ matrix.version }} | |
| hash: ${{ matrix.hash }} | |
| version_name: ${{ matrix.version_name }} | |
| check-ci: | |
| needs: prepare | |
| runs-on: ubuntu-latest | |
| outputs: | |
| ci_passed: ${{ steps.ci-check.outputs.ci_passed }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check CI status | |
| id: ci-check | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| output=$(./scripts/check-fc-ci.sh '${{ needs.prepare.outputs.matrix }}') | |
| echo "$output" | |
| ci_passed=$(echo "$output" | grep "^ci_passed=" | cut -d= -f2) | |
| echo "ci_passed=$ci_passed" >> $GITHUB_OUTPUT | |
| publish: | |
| name: Collect and upload builds | |
| needs: [build, check-ci] | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: builds | |
| pattern: firecracker-* | |
| merge-multiple: true | |
| - name: CI check result | |
| run: | | |
| if [[ "${{ needs.check-ci.outputs.ci_passed }}" != "true" ]]; then | |
| echo "⚠️ CI checks did not pass - skipping GCS upload and release" | |
| fi | |
| - name: Setup Service Account | |
| if: github.ref_name == 'main' && needs.check-ci.outputs.ci_passed == 'true' | |
| uses: google-github-actions/auth@v2 | |
| with: | |
| project_id: ${{ secrets.GCP_PROJECT_ID }} | |
| workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} | |
| - name: Upload firecrackers to GCS | |
| if: github.ref_name == 'main' && needs.check-ci.outputs.ci_passed == 'true' | |
| uses: "google-github-actions/upload-cloud-storage@v1" | |
| with: | |
| path: "./builds" | |
| destination: ${{ vars.GCP_BUCKET_NAME }}/firecrackers | |
| gzip: false | |
| parent: false | |
| - name: Create releases | |
| if: github.ref_name == 'main' && needs.check-ci.outputs.ci_passed == 'true' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "[email protected]" | |
| for dir in ./builds/*/; do | |
| version_name=$(basename "$dir") | |
| if git rev-parse "refs/tags/$version_name" >/dev/null 2>&1 || gh release view "$version_name" >/dev/null 2>&1; then | |
| continue | |
| fi | |
| git tag "$version_name" | |
| git push origin "$version_name" | |
| gh release create "$version_name" \ | |
| --title "Firecracker $version_name" \ | |
| --notes "Firecracker build: $version_name" \ | |
| "$dir/firecracker#${version_name}" | |
| done |