Skip to content

Commit

Permalink
update workflows to latest (#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajay-sentry authored May 13, 2024
1 parent c93b652 commit e03cf6f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
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

0 comments on commit e03cf6f

Please sign in to comment.