Merge pull request #500 from NillionNetwork/chore/rename-heartbeats #22
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-cli docker | |
| on: | |
| push: | |
| tags: | |
| - 'nilcc-agent-cli-*' | |
| branches: | |
| - main | |
| paths: | |
| - 'nilcc-agent-cli/**' | |
| - 'Cargo.lock' | |
| - 'crates/**' | |
| jobs: | |
| docker-build-nilcc-agent-cli: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Generate docker tag | |
| run: | | |
| if [[ "$GITHUB_REF" =~ ^refs/tags/nilcc-agent-cli-.* ]]; then | |
| # Remove the 'refs/tags/nilcc-agent-cli-' prefix for tags | |
| tag=${GITHUB_REF:26} | |
| else | |
| # Or use `latest` tag otherwise | |
| tag=latest | |
| fi | |
| echo "DOCKER_TAG=ghcr.io/nillionnetwork/nilcc-agent-cli:${tag}" >> $GITHUB_ENV | |
| - name: Build Docker image | |
| uses: docker/build-push-action@v2 | |
| with: | |
| context: . | |
| file: nilcc-agent-cli/Dockerfile | |
| tags: ${{ env.DOCKER_TAG }} | |
| - name: Log in to the container registry | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Push Docker image | |
| uses: docker/build-push-action@v2 | |
| with: | |
| context: . | |
| file: nilcc-agent-cli/Dockerfile | |
| push: true | |
| tags: ${{ env.DOCKER_TAG }} | |
| build-args: | | |
| VERSION=${{ env.PACKAGE_VERSION }} | |