Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: update gha-workflows to latest #556

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 13 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,33 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true


permissions:
contents: 'read'
id-token: 'write'
contents: "read"
id-token: "write"

jobs:

lint:
name: Run Lint
uses: codecov/gha-workflows/.github/workflows/lint.yml@v1.2.12
uses: codecov/gha-workflows/.github/workflows/lint.yml@v1.2.19

build:
name: Build API
uses: codecov/gha-workflows/.github/workflows/build-app.yml@v1.2.12
uses: codecov/gha-workflows/.github/workflows/build-app.yml@v1.2.19
secrets: inherit
with:
repo: ${{ vars.CODECOV_IMAGE_V2 || 'codecov/self-hosted-api' }}

codecovstartup:
name: Codecov Startup
needs: build
uses: codecov/gha-workflows/.github/workflows/codecov-startup.yml@v1.2.12
uses: codecov/gha-workflows/.github/workflows/codecov-startup.yml@v1.2.19
secrets: inherit

# ats:
# name: ATS
# needs: [build]
# if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
# uses: codecov/gha-workflows/.github/workflows/run-ats.yml@v1.2.12
# uses: codecov/gha-workflows/.github/workflows/run-ats.yml@v1.2.19
# secrets: inherit
# with:
# repo: ${{ vars.CODECOV_IMAGE_V2 || 'codecov/self-hosted-api' }}
Expand All @@ -49,15 +47,15 @@ jobs:
test:
name: Test
needs: [build]
uses: codecov/gha-workflows/.github/workflows/run-tests.yml@v1.2.12
uses: codecov/gha-workflows/.github/workflows/run-tests.yml@v1.2.19
secrets: inherit
with:
repo: ${{ vars.CODECOV_IMAGE_V2 || 'codecov/self-hosted-api' }}

build-self-hosted:
name: Build Self Hosted API
needs: [build, test]
uses: codecov/gha-workflows/.github/workflows/self-hosted.yml@v1.2.12
uses: codecov/gha-workflows/.github/workflows/self-hosted.yml@v1.2.19
secrets: inherit
with:
repo: ${{ vars.CODECOV_IMAGE_V2 || 'codecov/self-hosted-api' }}
Expand All @@ -66,28 +64,28 @@ jobs:
name: Push Staging Image
needs: [build, test]
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/staging' && github.repository_owner == 'codecov' }}
uses: codecov/gha-workflows/.github/workflows/push-env.yml@v1.2.17
uses: codecov/gha-workflows/.github/workflows/push-env.yml@v1.2.19
secrets: inherit
with:
environment: staging
repo: ${{ vars.CODECOV_IMAGE_V2 || 'codecov/self-hosted-api' }}

production:
name: Push Production Image
needs: [ build, test ]
needs: [build, test]
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' && github.repository_owner == 'codecov' }}
uses: codecov/gha-workflows/.github/workflows/push-env.yml@v1.2.17
uses: codecov/gha-workflows/.github/workflows/push-env.yml@v1.2.19
secrets: inherit
with:
environment: production
repo: ${{ vars.CODECOV_IMAGE_V2 || 'codecov/self-hosted-api' }}

self-hosted:
name: Push Self Hosted Image
needs: [ build-self-hosted, test ]
needs: [build-self-hosted, test]
secrets: inherit
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' && github.repository_owner == 'codecov' }}
uses: codecov/gha-workflows/.github/workflows/self-hosted.yml@v1.2.12
uses: codecov/gha-workflows/.github/workflows/self-hosted.yml@v1.2.19
with:
push_rolling: true
repo: ${{ vars.CODECOV_IMAGE_V2 || 'codecov/self-hosted-api' }}
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ on:
jobs:
patch-typing-check:
name: Run Patch Type Check
uses: codecov/gha-workflows/.github/workflows/mypy.yml@v1.2.18
uses: codecov/gha-workflows/.github/workflows/mypy.yml@v1.2.19
4 changes: 2 additions & 2 deletions .github/workflows/self-hosted-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
workflow_dispatch:
inputs:
versionName:
description: 'Name of version (ie 23.9.5)'
description: "Name of version (ie 23.9.5)"
required: true

jobs:
create-release-pr:
name: Create PR for Release ${{ github.event.inputs.versionName }}
uses: codecov/gha-workflows/.github/workflows/create-release-pr.yml@v1.2.12
uses: codecov/gha-workflows/.github/workflows/create-release-pr.yml@v1.2.19
secrets: inherit
8 changes: 4 additions & 4 deletions .github/workflows/self-hosted-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ on:
types: [closed]

permissions:
contents: 'read'
id-token: 'write'
contents: "read"
id-token: "write"

jobs:
create-release:
name: Tag Release ${{ github.head_ref }} and Push Docker image to Docker Hub
if: ${{ github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') && github.repository_owner == 'codecov' }}
uses: codecov/gha-workflows/.github/workflows/create-release.yml@v1.2.12
uses: codecov/gha-workflows/.github/workflows/create-release.yml@v1.2.19
with:
tag_to_prepend: self-hosted-
secrets: inherit

push-image:
needs: [create-release]
if: ${{ github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') && github.repository_owner == 'codecov' }}
uses: codecov/gha-workflows/.github/workflows/self-hosted.yml@v1.2.12
uses: codecov/gha-workflows/.github/workflows/self-hosted.yml@v1.2.19
secrets: inherit
with:
push_release: true
Expand Down