Skip to content

feat(workflows): add ephemeral environment prune and update ephemeral workflow - #406

Open
onouguier-ledger wants to merge 3 commits into
mainfrom
ephemeral-workflows
Open

feat(workflows): add ephemeral environment prune and update ephemeral workflow#406
onouguier-ledger wants to merge 3 commits into
mainfrom
ephemeral-workflows

Conversation

@onouguier-ledger

Copy link
Copy Markdown
Contributor

No description provided.

Comment on lines +8 to +15
runs-on: ubuntu-latest
steps:
- name: Checking out
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
- name: Remove argocd preview tags
run: gh pr list --label argocd/preview --json number --jq '.[].number' | xargs -I {} gh pr edit {} --remove-label argocd/preview
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
remove-ephemeral-tags:
runs-on: ubuntu-latest
steps:
- name: Checking out

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need checkout for a only changing PR labels?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gh cli needs a git repo AFAIK.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using it repo-less with full URL in input, for instance gh pr merge https://github.com/LedgerHQ/crypto-assets/pull/2260. However I don't know if it's easily applicable here

@fsamier fsamier Dec 2, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works in any directory (if you have the appropriate rights ofc) for instance:

 $ gh pr list --repo LedgerHQ/crypto-assets

(docs)
So I think you can manage to skip the checkout part with the correct context variables

@onouguier-ledger
onouguier-ledger marked this pull request as ready for review April 27, 2026 09:26
@onouguier-ledger
onouguier-ledger requested review from a team as code owners April 27, 2026 09:26
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

Successfully merging this pull request may close these issues.

3 participants