Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuration of artifacts retention time #1152

Closed
3 tasks done
millotp opened this issue Jun 24, 2024 · 3 comments · Fixed by #1153
Closed
3 tasks done

Allow configuration of artifacts retention time #1152

millotp opened this issue Jun 24, 2024 · 3 comments · Fixed by #1153
Assignees
Labels
area/summary kind/enhancement New feature or request

Comments

@millotp
Copy link

millotp commented Jun 24, 2024

Contributing guidelines

I've found a bug, and:

  • The documentation does not mention anything about my problem
  • There are no open or closed issues that are related to my problem

Description

Hello,

With the new feature in 6.0.0 to upload build artifacts, the retention time is set to 90 days (source) and is not configurable, which gives warning when the repository already has a default retention.

I like the new feature and would like to keep it, would it be possible to make this configurable, or use the repo default value directly ?

Expected behaviour

No warnings displayed

Actual behaviour

Screenshot 2024-06-24 at 08 46 02

Repository URL

No response

Workflow run URL

No response

YAML workflow

uses: docker/build-push-action@v6.1.0
with:
  file: build/docker/Dockerfile
  context: .
  push: false

Workflow logs

No response

BuildKit logs

No response

Additional info

No response

@crazy-max crazy-max added kind/enhancement New feature or request and removed status/triage labels Jun 24, 2024
@crazy-max
Copy link
Member

crazy-max commented Jun 24, 2024

Actual behaviour

Screenshot 2024-06-24 at 08 46 02

Yes we should keep default retention days set in repository settings. I think I will just remove the override here and allow customization with a new env var. Pretty much like https://github.com/actions/upload-artifact/ does.

@crazy-max
Copy link
Member

@millotp Should be fixed with #1153

You can try with:

Default from repo settings:

uses: crazy-max/docker-build-push-action@export-retention
with:
  file: build/docker/Dockerfile
  context: .
  push: false

Or custom value:

uses: crazy-max/docker-build-push-action@export-retention
with:
  file: build/docker/Dockerfile
  context: .
  push: false
env:
  DOCKER_BUILD_EXPORT_RETENTION_DAYS: 2

@millotp
Copy link
Author

millotp commented Jun 27, 2024

Thanks for the speedy fix !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/summary kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants