ci: comment test coverage in a separate job (#203) #123
This file contains 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-and-push" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Generate Tags | |
run: | | |
bash scripts/generate-tags.sh > .tag | |
echo "DOCKER_TAG=$(cat .tag)" >> $GITHUB_ENV | |
- name: Build And Push | |
uses: grafana/shared-workflows/actions/push-to-gar-docker@main | |
with: | |
# Don't push from forks | |
push: ${{ github.event.pull_request.head.repo.full_name == github.repository }} | |
# If we are building main, push to prod and add the 'latest' tag. | |
tags: |- | |
${{ env.DOCKER_TAG }} | |
type=raw,value=latest,enable=${{ github.ref_name == 'main' }} | |
context: "." | |
image_name: "influx2cortex" | |
environment: "${{ github.ref_name == 'main' && 'prod' || 'dev' }}" |