From 6e9a2f7fdcdb2d88c9e02459bfaa3d18682512f8 Mon Sep 17 00:00:00 2001 From: "Charlotte St. John" Date: Thu, 25 Jun 2026 18:24:06 -0500 Subject: [PATCH] ci: migrate runs-on to Twilio runner labels + SHA-pin actions --- .github/workflows/lint-python.yml | 4 ++-- .github/workflows/pr-lint.yml | 4 ++-- .github/workflows/test-and-deploy.yml | 22 +++++++++++----------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/lint-python.yml b/.github/workflows/lint-python.yml index 5dcf0328..82db2b6d 100644 --- a/.github/workflows/lint-python.yml +++ b/.github/workflows/lint-python.yml @@ -9,8 +9,8 @@ on: - main jobs: ruff: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-large steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 - run: pip install --user ruff - run: ruff check --ignore="E722,F40,F841" --line-length=320 --target-version=py37 . diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml index 31520079..9b1840ba 100644 --- a/.github/workflows/pr-lint.yml +++ b/.github/workflows/pr-lint.yml @@ -6,9 +6,9 @@ on: jobs: validate: name: Validate title - runs-on: ubuntu-latest + runs-on: ubuntu-latest-large steps: - - uses: amannn/action-semantic-pull-request@v5 + - uses: amannn/action-semantic-pull-request@e32d7e603df1aa1ba07e981f2a23455dee596825 # v5 with: types: | chore diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index 98bbeefb..4ae01d57 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -13,7 +13,7 @@ on: jobs: test: name: Test - runs-on: ubuntu-latest + runs-on: ubuntu-latest-large timeout-minutes: 20 strategy: matrix: @@ -22,11 +22,11 @@ jobs: DOCKER_LOGIN: ${{ secrets.DOCKER_USERNAME && secrets.DOCKER_AUTH_TOKEN }} steps: - name: Checkout sendgrid-python - uses: actions/checkout@v3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 - name: Login to Docker Hub if: env.DOCKER_LOGIN - uses: docker/login-action@v2 + uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_AUTH_TOKEN }} @@ -43,13 +43,13 @@ jobs: name: Deploy if: success() && github.ref_type == 'tag' needs: [ test ] - runs-on: ubuntu-latest + runs-on: ubuntu-latest-large steps: - name: Checkout sendgrid-python - uses: actions/checkout@v3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4 with: python-version: '3.10' @@ -61,20 +61,20 @@ jobs: python setup.py sdist bdist_wheel - name: Create GitHub Release - uses: sendgrid/dx-automator/actions/release@main + uses: sendgrid/dx-automator/actions/release@08b601b726671445abc798ed59881766ec8fefc6 # main with: footer: '**[pypi](https://pypi.org/project/sendgrid/${version})**' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Publish package to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1 with: user: __token__ password: ${{ secrets.PYPI_TOKEN }} - name: Submit metric to Datadog - uses: sendgrid/dx-automator/actions/datadog-release-metric@main + uses: sendgrid/dx-automator/actions/datadog-release-metric@08b601b726671445abc798ed59881766ec8fefc6 # main env: DD_API_KEY: ${{ secrets.DATADOG_API_KEY }} @@ -82,9 +82,9 @@ jobs: name: Slack notify on failure if: failure() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref_type == 'tag') needs: [ test, deploy ] - runs-on: ubuntu-latest + runs-on: ubuntu-latest-large steps: - - uses: rtCamp/action-slack-notify@v2 + - uses: rtCamp/action-slack-notify@33ca3be66c6f378fe1610fd1d5258632dbed5e58 # v2 env: SLACK_COLOR: failure SLACK_ICON_EMOJI: ':github:'