From 6651070f8627a01865623a61a304f35492503786 Mon Sep 17 00:00:00 2001 From: Kaitlyn Alphonse Date: Mon, 20 Apr 2026 16:40:59 -0400 Subject: [PATCH] fix: update workflow actions, Python 3.13, and guard workflow checks --- .github/workflows/cd.yml | 4 ++-- .github/workflows/ci.yml | 4 ++-- .github/workflows/docs.yml | 4 ++-- .github/workflows/guard.yml | 8 ++++---- .github/workflows/super-linter.yml | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 9986674..cbce0c1 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -19,12 +19,12 @@ environment: production steps: - name: Check out the code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.12' + python-version: '3.13' - name: Install dependencies run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c405ac..67ce38a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,12 +23,12 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.12' + python-version: '3.13' - name: Install dependencies run: | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0e9fc4a..bb0fd96 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -25,12 +25,12 @@ jobs: echo "🔎 The branch is ${{ github.ref_name }} in ${{ github.repository }}." - name: Check out repository code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.13' cache: 'pip' - name: Install Python dependencies diff --git a/.github/workflows/guard.yml b/.github/workflows/guard.yml index 0d0b018..60f2213 100644 --- a/.github/workflows/guard.yml +++ b/.github/workflows/guard.yml @@ -16,12 +16,12 @@ steps: - name: Preamble run: | - echo "🎉 A $EVENT triggered a ${{ runner.os }} job." - echo "🔎 The branch is $BRANCH in $REPO." + echo "🎉 A ${{ github.event_name }} triggered a ${{ runner.os }} job." + echo "🔎 The branch is ${{ github.ref_name }} in ${{ github.repository }}." - name: Check out repository code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Guard the main branch - if: ${{ env.HEAD != 'staging' && env.HEAD != ''}} + if: ${{ github.event_name == 'pull_request' && github.head_ref != 'staging' }} run: | echo "🚫 The main branch is protected." echo "🚫 Pull requests to main must come from staging branch." diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index e1b2b96..2de6524 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -19,7 +19,7 @@ runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: # Full git history is needed to get a proper # list of changed files within `super-linter`