2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

GitHub Action で「Create Artifact Container failed: Artifact storage quota has been hit. Unable to upload any new artifacts.」と出たときの解決策

Posted at

問題

ストレージ容量(無料プランの場合500MB/月)を使い切ると、Create Artifact Container failed: Artifact storage quota has been hit. Unable to upload any new artifacts. というエラーが出てGitHub Actionsを正常に実行できなくなる

image.png

対策1:古いArtifactを削除する

古いArtifactを削除するActionを追加して、ストレージ容量を節約する。

.github/workflows/artifacts_cleanup.yml
name: 'artifacts cleanup'
on:
  # 毎日0時に自動実行
  schedule:
    - cron: '0 0 * * *' # UTC
  
  # 手動実行
  workflow_dispatch:

jobs:
  delete-artifacts:
    runs-on: ubuntu-latest
    steps:
      - uses: kolpav/purge-artifacts-action@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          expire-in: 30 minutes

Actionは毎日0時に実行される他、以下のように手動実行することもできる。
image.png

対策2:有料プランに変更する

ストレージ容量は、Teamプランなら2GB/月、Enterpriseプランなら50GB/月に増える。また、$0.25/GBでストレージ容量を追加できる。
image.png

参考文献

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?