Resolved

GitHub Actions upload-artifact v3 deprecation warning breaks workflow

GitHub Actions
CI/CD
DevOps
Workflow
Deprecation
YAML
Automation

Scheduled GitHub Actions job fails with deprecation notice for actions/upload-artifact v3 | Requires version bump to v4 to maintain workflow functionality

Upgrading GitHub Actions Workflows from Artifact v3 to v4

Issue

A GitHub Actions workflow failed due to a deprecation warning for the actions/upload-artifact@v3 action. The workflow, responsible for generating and uploading compliance reports, encountered errors when attempting to upload artifacts, as GitHub no longer supports the v3 version of the upload-artifact action.

Culprit

The workflow referenced the deprecated actions/upload-artifact@v3, which reached end-of-life in April 2024. GitHub’s infrastructure now rejects all usage of v3, causing workflows that rely on this version to fail during execution. This affected the scheduled job that processes audit policy compliance and uploads Markdown reports as artifacts.

Solution

Updated the workflow to use the latest version of the upload-artifact action, v4, which maintains backward compatibility for basic usage patterns. The upgrade involved:

  • Changing the action reference from actions/upload-artifact@v3 to actions/upload-artifact@v4.
  • Verifying that all parameters (name, path, retention-days) continue to work as expected in v4.

Outcome: The workflow now successfully uploads artifacts without errors, ensuring compliance reports are stored and retained as intended.