Skip to content

Commit

Permalink
Update purge workflow with manual trigger (radius-project#7622)
Browse files Browse the repository at this point in the history
# Description

The purge test workflow is failing with authentication issues. The
documentation says to use GITHUB_TOKEN with package permissions but we
need to be able to test this first. This PR will update the manual
trigger so we can add permissions in a followup PR


https://docs.github.com/en/packages/learn-github-packages/about-permissions-for-github-packages#maintaining-access-to-packages-in-github-actions-workflows

https://docs.github.com/en/actions/publishing-packages/publishing-docker-images#publishing-images-to-github-packages

## Type of change

<!--

Please select **one** of the following options that describes your
change and delete the others. Clearly identifying the type of change you
are making will help us review your PR faster, and is used in authoring
release notes.

If you are making a bug fix or functionality change to Radius and do not
have an associated issue link please create one now.

-->

- This pull request is a minor refactor, code cleanup, test improvement,
or other maintenance task and doesn't change the functionality of Radius
radius-project#7621 .

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: #issue_number

---------

Signed-off-by: sk593 <[email protected]>
  • Loading branch information
sk593 authored May 28, 2024
1 parent 67f19d3 commit f7ef3b2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/purge-test-resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ permissions:
contents: read # Required for actions/checkout

on:
# Enable manual trigger
workflow_dispatch:
schedule:
# Run twice a day
- cron: "30 0,12 * * *"
Expand All @@ -33,7 +35,7 @@ env:
ACTION_LINK: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"

jobs:
purge_gchr_dev:
purge_ghcr_dev:
name: Delete old unused container images
runs-on: ubuntu-latest
if: github.repository == 'radius-project/radius'
Expand Down Expand Up @@ -101,9 +103,9 @@ jobs:
done
create_issue_on_failure:
name: Create issue for failing purge test resources run
needs: [purge_gchr_dev, purge_azure_resources]
needs: [purge_ghcr_dev, purge_azure_resources]
runs-on: ubuntu-latest
if: always() && (needs.purge_gchr_dev.result == 'failure' || needs.purge_azure_resources.result == 'failure')
if: always() && ${{ github.event_name != 'workflow_dispatch' }} && (needs.purge_ghcr_dev.result == 'failure' || needs.purge_azure_resources.result == 'failure')
steps:
- uses: actions/github-script@v7
with:
Expand Down

0 comments on commit f7ef3b2

Please sign in to comment.