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: upgrade deprecated actions on GH workflows #23

Merged
merged 1 commit into from
May 10, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/build-and-push-dockerhub.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Build and push to Dockerhub

on:
Expand All @@ -7,7 +6,7 @@ on:
repo:
type: string
required: false
default: 'codecov'
default: "codecov"
cache:
type: boolean
default: true
Expand All @@ -20,7 +19,7 @@ on:
push:
type: boolean
default: true
description: 'Whether to push the image'
description: "Whether to push the image"

env:
DOCKERHUB_REPO: ${{ inputs.repo }}
Expand All @@ -38,7 +37,7 @@ jobs:
- name: Cache Image
id: cache-image
if: inputs.cache
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-${{ inputs.image_name }}
with:
Expand All @@ -58,7 +57,7 @@ jobs:
make save.${{ inputs.image_name }}

- name: Log in to Docker Hub
uses: docker/login-action@v1.14.1
uses: docker/login-action@v3.1.0
if: ${{ inputs.push && !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
with:
username: ${{ secrets.CODECOV_DEVOPS_DOCKER_USERNAME }}
Expand All @@ -68,4 +67,4 @@ jobs:
if: ${{ inputs.push && !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
run: |
make tag.${{ inputs.image_name }}
make push.${{ inputs.image_name }}
make push.${{ inputs.image_name }}
9 changes: 4 additions & 5 deletions .github/workflows/build-app.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Build App

on:
Expand Down Expand Up @@ -26,7 +25,7 @@ jobs:
- id: "auth"
if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v1.1.1"
uses: "google-github-actions/auth@v2.1.2"
with:
token_format: "access_token"
workload_identity_provider: ${{ secrets.CODECOV_GCP_WIDP }}
Expand All @@ -40,7 +39,7 @@ jobs:
- name: Cache Requirements
id: cache-requirements
if: inputs.cache_requirements
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-requirements
with:
Expand All @@ -52,7 +51,7 @@ jobs:

- name: Cache App
id: cache-app
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-app
with:
Expand All @@ -78,4 +77,4 @@ jobs:
- name: Build app
run: |
make build.app
make save.app
make save.app
17 changes: 8 additions & 9 deletions .github/workflows/push-env.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Push Image for Environment

on:
Expand All @@ -17,11 +16,11 @@ on:
push_rolling:
type: boolean
default: false
description: 'Whether to push the rolling image'
description: "Whether to push the rolling image"
push_release:
type: boolean
default: false
description: 'Whether to push the release image'
description: "Whether to push the release image"

env:
AR_REPO: ${{ inputs.repo }}
Expand All @@ -44,7 +43,7 @@ jobs:
run: echo short_sha="${SHA:0:7}" >> $GITHUB_OUTPUT
- name: Cache App
id: cache-app
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-app
with:
Expand All @@ -56,7 +55,7 @@ jobs:
docker load --input app.tar
- id: "auth"
name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v1.1.1"
uses: "google-github-actions/auth@v2.1.2"
with:
token_format: "access_token"
workload_identity_provider: ${{ secrets.CODECOV_GCP_WIDP }}
Expand Down Expand Up @@ -106,7 +105,7 @@ jobs:
fetch-depth: 0
- name: Cache App
id: cache-app
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-app
with:
Expand All @@ -117,7 +116,7 @@ jobs:
run: |
docker load --input app.tar
- name: Log in to Docker Hub
uses: docker/login-action@v1.14.1
uses: docker/login-action@v3.1.0
with:
username: ${{ secrets.CODECOV_DEVOPS_DOCKER_USERNAME }}
password: ${{ secrets.CODECOV_DEVOPS_DOCKER_PASSWORD }}
Expand All @@ -136,7 +135,7 @@ jobs:
fetch-depth: 0
- name: Cache App
id: cache-app
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-app
with:
Expand All @@ -147,7 +146,7 @@ jobs:
run: |
docker load --input app.tar
- name: Log in to Docker Hub
uses: docker/login-action@v1.14.1
uses: docker/login-action@v3.1.0
with:
username: ${{ secrets.CODECOV_DEVOPS_DOCKER_USERNAME }}
password: ${{ secrets.CODECOV_DEVOPS_DOCKER_PASSWORD }}
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/run-ats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Run ATS

on:
Expand All @@ -10,7 +9,7 @@ on:
app_container_name:
type: string
required: false
default: 'app'
default: "app"
use_action:
type: boolean
required: false
Expand All @@ -19,27 +18,27 @@ on:
required: false
default: false
type: boolean
description: 'Whether to install the Codecov CLI. Set to false if you have previously installed the CLI.'
description: "Whether to install the Codecov CLI. Set to false if you have previously installed the CLI."
run_tests:
required: false
default: true
type: boolean
description: 'Whether to run the tests with the given command in the container. If set to true, this will run the test command and upload to Codecov'
description: "Whether to run the tests with the given command in the container. If set to true, this will run the test command and upload to Codecov"
test_command:
required: false
default: 'python -m pytest --cov=./'
default: "python -m pytest --cov=./"
type: string
description: 'Command to run in container to execute tests. Required when run_tests is true. This should be `pytest` with the desired args at this point.'
description: "Command to run in container to execute tests. Required when run_tests is true. This should be `pytest` with the desired args at this point."
codecov_cli_upload_args:
required: false
type: string
default: ''
description: 'List of args to pass to cli on upload. This is kind of a hack pending a more robust solution'
default: ""
description: "List of args to pass to cli on upload. This is kind of a hack pending a more robust solution"
codecov_cli_yml_path:
required: false
type: string
default: '--codecov-yml-path=codecov_cli.yml'
description: 'Path to codecov cli yml. Currently expected to include flag as well --codecov-yml-path=codecov_cli.yml for ex.'
default: "--codecov-yml-path=codecov_cli.yml"
description: "Path to codecov cli yml. Currently expected to include flag as well --codecov-yml-path=codecov_cli.yml for ex."
env:
AR_REPO: ${{ inputs.repo }}

Expand All @@ -54,7 +53,7 @@ jobs:
fetch-depth: 0
- name: Cache App
id: cache-app
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-app
with:
Expand Down Expand Up @@ -102,4 +101,4 @@ jobs:
install_cli: ${{ inputs.install_cli }}
run_tests: ${{ inputs.run_tests }}
test_command: ${{ inputs.test_command }}
codecov_url: ${{ secrets.CODECOV_ATS_URL }}
codecov_url: ${{ secrets.CODECOV_ATS_URL }}
5 changes: 2 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Run Tests

on:
Expand All @@ -25,7 +24,7 @@ jobs:
fetch-depth: 0
- name: Cache App
id: cache-app
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-app
with:
Expand Down Expand Up @@ -69,4 +68,4 @@ jobs:
- name: upload using codecovcli public qa
if: ${{ !cancelled() && !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
run: |
make test_env.upload CODECOV_UPLOAD_TOKEN=${{ secrets.CODECOV_PUBLIC_QA_TOKEN }} CODECOV_URL=${{ secrets.CODECOV_PUBLIC_QA_URL }}
make test_env.upload CODECOV_UPLOAD_TOKEN=${{ secrets.CODECOV_PUBLIC_QA_TOKEN }} CODECOV_URL=${{ secrets.CODECOV_PUBLIC_QA_URL }}
26 changes: 13 additions & 13 deletions .github/workflows/self-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:
push_rolling:
type: boolean
default: false
description: 'Whether to push the rolling image'
description: "Whether to push the rolling image"
push_release:
type: boolean
default: false
description: 'Whether to push the release image'
description: "Whether to push the release image"
repo:
type: string
required: true
Expand All @@ -30,7 +30,7 @@ jobs:
- id: "auth"
if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' && inputs.cache_requirements }}
name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v1.1.1"
uses: "google-github-actions/auth@v2.1.2"
with:
token_format: "access_token"
workload_identity_provider: ${{ secrets.CODECOV_GCP_WIDP }}
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Cache Requirements
id: cache-requirements
if: inputs.cache_requirements
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-requirements
with:
Expand All @@ -56,7 +56,7 @@ jobs:

- name: Cache Self hosted
id: cache-self-hosted
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-self-hosted
with:
Expand All @@ -73,7 +73,7 @@ jobs:
- name: Build/pull requirements
if: ${{ steps.cache-requirements.outputs.cache-hit != 'true' && inputs.cache_requirements }}
run: |
make build.requirements
make build.requirements

- name: Load built image
if: ${{ steps.cache-self-hosted.outputs.cache-hit == 'true' }}
Expand All @@ -88,7 +88,7 @@ jobs:

self-hosted:
name: Push Self Hosted Image
needs: [ build-self-hosted ]
needs: [build-self-hosted]
if: inputs.push_rolling == true && github.repository_owner == 'codecov' && !github.event.pull_request.head.repo.fork
runs-on: ubuntu-latest
environment: self-hosted
Expand All @@ -99,7 +99,7 @@ jobs:
fetch-depth: 0
- name: Cache Self hosted
id: cache-self-hosted
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-self-hosted
with:
Expand All @@ -111,7 +111,7 @@ jobs:
run: |
make load.self-hosted
- name: Log in to Docker Hub
uses: docker/login-action@v1.14.1
uses: docker/login-action@v3.1.0
with:
username: ${{ secrets.CODECOV_DEVOPS_DOCKER_USERNAME }}
password: ${{ secrets.CODECOV_DEVOPS_DOCKER_PASSWORD }}
Expand All @@ -121,7 +121,7 @@ jobs:
make push.self-hosted-rolling
self-hosted-release:
name: Push Self Hosted Release Image
needs: [ build-self-hosted ]
needs: [build-self-hosted]
if: inputs.push_release == true && github.repository_owner == 'codecov' && !github.event.pull_request.head.repo.fork
runs-on: ubuntu-latest
environment: self-hosted
Expand All @@ -132,7 +132,7 @@ jobs:
fetch-depth: 0
- name: Cache Self hosted
id: cache-self-hosted
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-self-hosted
with:
Expand All @@ -144,11 +144,11 @@ jobs:
run: |
make load.self-hosted
- name: Log in to Docker Hub
uses: docker/login-action@v1.14.1
uses: docker/login-action@v3.1.0
with:
username: ${{ secrets.CODECOV_DEVOPS_DOCKER_USERNAME }}
password: ${{ secrets.CODECOV_DEVOPS_DOCKER_PASSWORD }}
- name: Push self hosted release
run: |
make tag.self-hosted-release
make push.self-hosted-release
make push.self-hosted-release
Loading