ci: allow manual pull of tag or commit
This commit is contained in:
parent
063442dac9
commit
3c9ca40325
1 changed files with 12 additions and 3 deletions
|
@ -1,5 +1,10 @@
|
|||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ref_name:
|
||||
description: 'Tag or commit'
|
||||
required: false
|
||||
type: string
|
||||
|
||||
schedule:
|
||||
- cron: '@hourly'
|
||||
|
@ -24,9 +29,13 @@ jobs:
|
|||
token: ${{ secrets.CODE_FORGEJO_TOKEN }}
|
||||
- name: Missing tag detecting
|
||||
run: |
|
||||
git ls-remote $upstream "refs/tags/$tags" | grep -v '{' | sed 's|.*/||' > upstream_tags
|
||||
git ls-remote ${{ github.server_url}}/${{ github.repository }} "refs/tags/$tags" | grep -v '{' | sed 's|.*/||' > destination_tags
|
||||
cat upstream_tags destination_tags | tr ' ' '\n' | sort | uniq -u > missing_tags
|
||||
if [ -n "${{ inputs.ref_name }}" ]; then
|
||||
echo ${{ inputs.ref_name }} > missing_tags
|
||||
else
|
||||
git ls-remote $upstream "refs/tags/$tags" | grep -v '{' | sed 's|.*/||' > upstream_tags
|
||||
git ls-remote ${{ github.server_url}}/${{ github.repository }} "refs/tags/$tags" | grep -v '{' | sed 's|.*/||' > destination_tags
|
||||
cat upstream_tags destination_tags | tr ' ' '\n' | sort | uniq -u > missing_tags
|
||||
fi
|
||||
echo "Missing tags:"
|
||||
cat missing_tags
|
||||
- name: Missing tag fetch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue