Promote Image to registry.k8s.io #25
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: Promote Image to registry.k8s.io | |
on: | |
schedule: | |
- cron: '0 16 * * *' # Run every day at GMT+8 midnight | |
workflow_dispatch: # Use for manaully trigger to debug | |
jobs: | |
promote-image: | |
runs-on: ubuntu-latest | |
environment: promote-image | |
steps: | |
# This step uses Github's checkout-action: https://github.com/actions/checkout | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
# pass XudongLiuHarold in this step because kpromo can only work on a fork, so leverage | |
# one maintainer(@XudongLiuHarold)'s fork repo | |
- name: Run kpromo command to promote image to registry.k8s.io | |
run: | | |
if hack/match-release-tag.sh >/dev/null 2>&1; then | |
./hack/kpromo.sh XudongLiuHarold | |
else | |
echo "$(git describe --dirty) is not a release tag, skip promoting to registry.k8s.io" | |
fi | |
env: | |
GITHUB_TOKEN: ${{ secrets.XUDONG_GITHUB_TOKEN }} |