포스트

깃허브 액션 아티팩트 버전 에러 해결

안녕하세요 🐸

깃허브 액션에서 에러가 발생하여 기록을 남깁니다.

최근 커밋을 해놓고 문득 확인해보니 다음과 같은 에러가 발생했습니다.

1
This request has been automatically failed because it uses a deprecated version of `actions/upload-artifact: v3`. Learn more: [https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/](https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/)

내용을 읽어보니 actions/upload-artifact 라는 것이 v3 버전은 deprecated 됐다는 겁니다.

링크를 접속해보면

Starting January 30th, 2025, GitHub Actions customers will no longer be able to use v3 of actions/upload-artifact or actions/download-artifact. Customers should update workflows to begin using v4 of the artifact actions as soon as possible

25년 1월 30일부터 actions/upload-artifact , actions/download-artifact v3버전 사용이 불가하니 v4버전을 사용하라는 내용인데요.

해당 아티팩트의 버전업을 하기위해 어떤 경로에 있는 어떠한 파일을 수정해야하는지는 설명이 없습니다.

수정 파일

/.github/workflows

본인 레포지토리 프로젝트에서 위의 경로 위치한 yml 파일에서 해당 내용을 수정하면 됩니다.
제 경우 .github/workflows/pages-deploy.yml 입니다.

수정 내용

가장 손쉽게는 actions/upload-artifact , actions/download-artifact 를 찾아서 버전을 바꿔주면 되는데요.
일부 사용자의 경우 해당 아티팩트를 직접적으로 사용하지 않는 경우가 있습니다.
제가 그랬습니다.
그런 경우 파일 내에서 사용하고 있는 아티팩트를 하나씩 확인해서 해당 아티팩트가 다시 위의 아티팩트를 사용하고 있지 않은지 확인해야합니다.
제 경우 actions/upload-pages-artifact 아티팩트가 actions/upload-artifact 를 사용하고 있었습니다.
아티팩트의 최신 버전은 아티팩트의 이름을 검색하여 나오는 레포지토리에서 손쉽게 확인 가능합니다.


참고 : upload-pages-artifact 레포지토리


요약

원인

깃허브 액션에서 사용하는 아티팩트의 버전 문제.
문제가 되는 아티팩트는 로그에서 바로 확인 가능.

해결 요약

문제 되는 아티팩트의 버전 업그레이드

해결 방법

레포지토리의 아래 경로에서

.github/workflows

.yml 파일에서 아티팩트 버전을 수정.
문제되는 아티팩트가 없는경우 다른 아티팩트에 의해 사용되고 있을 수 있으니 확인 필요.

예시

수정 전)

1
2
3
4
      - name: Upload site artifact
        uses: actions/upload-pages-artifact@v1
        with:
          path: "_site$"

수정 후)

1
2
3
4
      - name: Upload site artifact
        uses: actions/upload-pages-artifact@v3
        with:
          path: "_site$"

설명 : actions/upload-pages-artifact v1은 actions/upload-artifact v3을 사용 중.
actions/upload-pages-artifact v3은 actions/upload-artifact v4을 사용 중.

이 기사는 저작권자의 CC BY 4.0 라이센스를 따릅니다.