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

lifecycle-policy file #1268

Open
Bryan-Meier opened this issue May 17, 2024 · 1 comment
Open

lifecycle-policy file #1268

Bryan-Meier opened this issue May 17, 2024 · 1 comment

Comments

@Bryan-Meier
Copy link

Is it or would it be possible to point to a file in another repo for the lifecycle-policy.json? Our situation is such that we have a repo with our workflow. This workflow is used by multiple other repos by way of workflow_call. Our lifecycle-policy.json file is in the repo that contains our shared workflow and thus we need to point to that file.

Thoughts or ideas are more than welcomed.

@KelvinVenancio
Copy link

@Bryan-Meier I believe this issue stems more from a limitation with GitHub rather than the action itself. We've encountered a similar situation with our reusable workflows. To address this, we utilize curl to fetch the policy file and then configure it across all repositories that implement these workflows. This method ensures consistency and compliance throughout our projects.

      - name: Download ECR Policy
        run: |
          curl -s -o lifecycle-policy.json https://pastebin.com/raw/YQxpnEKe

      - uses: int128/create-ecr-repository-action@v1
        with:
          repository: ${{ inputs.ECR_REPO_NAME }}
          lifecycle-policy: lifecycle-policy.json

I hope it helps you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants