DEV Community

Roberto Luna
Roberto Luna

Posted on

Upgrading CI Workflows: From Node 20 to Node 22 and Actions v5/v6

Upgrading CI Workflows: From Node 20 to Node 22 and Actions v5/v6

 

TL;DR: I upgraded the CI workflows for the content-automation repository from Node 20 to Node 22 and Actions v5/v6, addressing compatibility issues and improving performance. Key changes included updating upload-artifact from v5 to v7 and implementing retry with backoff.

The Problem

The CI workflows for the content-automation repository were using Node 20 internally, despite the configuration specifying Node 20. This discrepancy caused compatibility issues with newer versions of the GitHub Actions. Specifically, the upload-artifact action was still on version 5, which was internally targeting Node 20.

What I Tried First

Initially, I attempted to update the upload-artifact action to version 7, which supports Node 22. However, this change alone did not resolve the issue, as other actions like checkout and setup-python were still on older versions.

The Implementation

To address the compatibility issues, I updated the following actions:

  • upload-artifact from v5 to v7
  • checkout to v5
  • setup-python to v6

Here are the specific code changes:

// .github/workflows/main.yml
steps:
  - name: Checkout code
    uses: actions/checkout@v5
  - name: Setup Python
    uses: actions/setup-python@v6
  - name: Upload artifact
    uses: actions/upload-artifact@v7
Enter fullscreen mode Exit fullscreen mode

Additionally, I implemented a retry mechanism with backoff for the CI workflows:

// .github/workflows/main.yml
steps:
  - name: Retry with backoff
    run: |
      for i in {1..3}; do
        if ./script.sh; then
          break
        else
          echo "Retry $i failed, backing off..."
          sleep $((i * 2))
        fi
      done
Enter fullscreen mode Exit fullscreen mode

Key Takeaway

The key takeaway from this experience is the importance of keeping CI workflows up-to-date with the latest versions of GitHub Actions. This not only ensures compatibility but also improves performance and reliability.

What's Next

Next, I plan to monitor the CI workflows for any issues and continue to optimize the retry mechanism for better performance. I will also explore other ways to improve the reliability and efficiency of the content-automation repository.

vibecoding #buildinpublic #devops #ci-cd


Part of my Build in Public series — sharing the real process of building SaaS projects from Playa del Carmen, México.

Repo: zaerohell/content-automation · 2026-07-11

#playadev #buildinpublic

Top comments (0)