Delete Docker Images nightly on artifactory #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Delete Docker Images nightly on artifactory | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: # Enable manual triggering | |
jobs: | |
nightly-job: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check DOCKER_REGISTRY secret | |
run: | | |
if [[ "${{ secrets.DOCKER_REGISTRY }}" == *"artifactory"* ]]; then | |
echo "hello" | |
else | |
echo "Skipping workflow as DOCKER_REGISTRY does not contain 'artifactory'." | |
exit 0 | |
fi |