Feature/kubemodel #198
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 test agent | |
| on: | |
| pull_request: | |
| branches: | |
| - develop | |
| env: | |
| IMAGE_TAG_BASE: "gcr.io/${{ vars.GCR_PROJECT_ID }}/agent" | |
| jobs: | |
| build_test_agent: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| outputs: | |
| AGENT_IMAGE_TAG: ${{ steps.tag.outputs.AGENT_IMAGE_TAG }} | |
| steps: | |
| - name: Checkout ibm-finops-agent | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head.sha || github.ref }} | |
| path: ./ibm-finops-agent | |
| # Creates tags for agent images | |
| - name: Set image tag | |
| id: tag | |
| run: | | |
| echo "AGENT_IMAGE_TAG=${{ env.IMAGE_TAG_BASE }}:${{ github.event.pull_request.head.sha || github.event.merge_group.head.sha || github.ref }}" >> $GITHUB_OUTPUT | |
| - name: Output config info | |
| run: | | |
| echo "Agent image tag: ${{ steps.tag.outputs.AGENT_IMAGE_TAG }}" | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build test agent | |
| id: docker_build_agent | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./ibm-finops-agent | |
| file: ./ibm-finops-agent/Dockerfile | |
| platforms: "linux/amd64,linux/arm64" | |
| push: false | |
| build-args: | | |
| version=${{ github.event.pull_request.head.sha || github.event.merge_group.head.sha || github.ref }} | |
| tags: | | |
| ${{ steps.tag.outputs.AGENT_IMAGE_TAG }} |