Skip to content

chore(deps): bump codecov/codecov-action from 4.6.0 to 5.1.2 #926

chore(deps): bump codecov/codecov-action from 4.6.0 to 5.1.2

chore(deps): bump codecov/codecov-action from 4.6.0 to 5.1.2 #926

Workflow file for this run

---
on:
push:
branches:
- master
tags:
- v*
pull_request:
branches:
- master
jobs:
test:
strategy:
matrix:
go-version: [1.23.4]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
BQ_DATASET_NAME : github_actions_${{ github.run_id }}_${{ github.run_attempt }}
# The permissions block is required for GCP auth. Adds "id-token" with the intended permissions.
permissions:
contents: 'read'
id-token: 'write'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Compile
run: make build
- name: golangci-lint
uses: golangci/[email protected]
with:
version: v1.62.2
- name: Test
run: make test-unit
- name: Upload unit test coverage to Codecov
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true
files: ./coverage.unit
flags: unit
verbose: true
# actions/checkout MUST come before auth
- name: Authenticate to Google Cloud
id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
workload_identity_provider: 'projects/821427311413/locations/global/workloadIdentityPools/prombq-adaptor/providers/github'
service_account: '[email protected]'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
- name: Test E2E
run: |
make bq-setup
make test-e2e
- name: Upload e2e test coverage to Codecov
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true
files: ./coverage.e2e
flags: e2e
verbose: true
- name: Clean Up E2E BigQuery
if: always()
run: |
make bq-cleanup
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
install-only: true
version: "~> v2"
- name: Test GoReleaser
run: make test-release
deploy:
if: startsWith(github.ref, 'refs/tags/v')
needs: test
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.4
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=quay.io/kohlstechnology/prometheus_bigquery_remote_storage_adapter
VERSION=${GITHUB_REF#refs/tags/}
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:latest"
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to quay.io
uses: docker/login-action@v3
with:
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}
registry: quay.io
- name: Build and push to quay.io
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.prep.outputs.tags }}
platforms: linux/amd64,linux/arm64
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
install-only: true
version: "~> v2"
- name: Run GoReleaser
run: make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}