kopia lustrzana https://github.com/cirospaciari/socketify.py
update git clone counter workflow
rodzic
5751cfe93a
commit
a1f34bbe85
|
@ -28,12 +28,12 @@ jobs:
|
||||||
if gh secret list | grep -q "GIST_ID"
|
if gh secret list | grep -q "GIST_ID"
|
||||||
then
|
then
|
||||||
echo "GIST_ID found"
|
echo "GIST_ID found"
|
||||||
echo ::set-output name=GIST::${{ secrets.GIST_ID }}
|
echo ::set-output name=GIST::${{ secrets.CLONE_GIST_ID }}
|
||||||
curl https://gist.githubusercontent.com/${{ github.actor }}/${{ secrets.GIST_ID }}/raw/clone.json > clone_before.json
|
curl https://gist.githubusercontent.com/${{ github.actor }}/${{ secrets.CLONE_GIST_ID }}/raw/clone.json > clone_before.json
|
||||||
if cat clone_before.json | grep '404: Not Found'; then
|
if cat clone_before.json | grep '404: Not Found'; then
|
||||||
echo "GIST_ID not valid anymore. Creating another gist..."
|
echo "GIST_ID not valid anymore. Creating another gist..."
|
||||||
gist_id=$(gh gist create clone.json | awk -F / '{print $NF}')
|
gist_id=$(gh gist create clone.json | awk -F / '{print $NF}')
|
||||||
echo $gist_id | gh secret set GIST_ID
|
echo $gist_id | gh secret set CLONE_GIST_ID
|
||||||
echo ::set-output name=GIST::$gist_id
|
echo ::set-output name=GIST::$gist_id
|
||||||
cp clone.json clone_before.json
|
cp clone.json clone_before.json
|
||||||
git rm --ignore-unmatch CLONE.md
|
git rm --ignore-unmatch CLONE.md
|
||||||
|
@ -87,4 +87,4 @@ jobs:
|
||||||
- name: Push
|
- name: Push
|
||||||
uses: ad-m/github-push-action@master
|
uses: ad-m/github-push-action@master
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.BUILDTOKEN }}
|
Ładowanie…
Reference in New Issue