Merge pull request #500 from NillionNetwork/chore/rename-heartbeats #294
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: nilcc-agent build/push | |
| on: | |
| push: | |
| tags: | |
| - 'nilcc-agent-*' | |
| branches: | |
| - main | |
| paths: | |
| - 'nilcc-agent/**' | |
| - 'crates/**' | |
| - 'Cargo.lock' | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install stable rust toolchain | |
| uses: dtolnay/[email protected] | |
| - name: Build Agent | |
| run: cargo build --release --package nilcc-agent | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: "arn:aws:iam::592920173613:role/github-runners-productionnilcc-ci-nilcc-bucket" | |
| aws-region: eu-west-1 | |
| - name: Publish | |
| run: | | |
| if [[ "$GITHUB_REF" =~ ^refs/tags/nilcc-agent-.* ]]; then | |
| # Remove the 'refs/tags/nilcc-agent-' prefix and keep the version | |
| version=${GITHUB_REF:22} | |
| else | |
| # Or the short git hash otherwise. | |
| version=$(git rev-parse --short HEAD) | |
| fi | |
| aws s3 cp "target/release/nilcc-agent" "s3://nilcc/${version}/nilcc-agent/x86-64/nilcc-agent" |