mirror of
https://github.com/elseif/MikroTikPatch
synced 2026-07-17 10:39:40 +00:00
Update mikrotik_patch_7.yml
Signed-off-by: elseif <elseif@live.cn>
This commit is contained in:
parent
ec1c0f1719
commit
6519ab2e12
63
.github/workflows/mikrotik_patch_7.yml
vendored
63
.github/workflows/mikrotik_patch_7.yml
vendored
@ -708,38 +708,39 @@ jobs:
|
|||||||
--header "Content-Type:application/json" \
|
--header "Content-Type:application/json" \
|
||||||
--data '{"purge_everything": true}'
|
--data '{"purge_everything": true}'
|
||||||
|
|
||||||
# - name: Delete Release tag ${{ env.LATEST_VERSION }} ${{ env.ARCH }}
|
- name: Delete Release tag ${{ env.LATEST_VERSION }} ${{ env.ARCH }}
|
||||||
# if: steps.get_latest.outputs.has_new_version == 'true' && env.RELEASE == 'true'
|
if: steps.get_latest.outputs.has_new_version == 'true' && env.RELEASE == 'true'
|
||||||
# run: |
|
run: |
|
||||||
# HEADER="Authorization: token ${{ secrets.GITHUB_TOKEN }}"
|
sed -i "1i Build Time:$BUILD_TIME" CHANGELOG
|
||||||
# RELEASE_INFO=$(curl -s -H "$HEADER" https://api.github.com/repos/${{ github.repository }}/releases/tags/$LATEST_VERSION$ARCH)
|
HEADER="Authorization: token ${{ secrets.GITHUB_TOKEN }}"
|
||||||
# RELEASE_ID=$(echo $RELEASE_INFO | jq -r '.id')
|
RELEASE_INFO=$(curl -s -H "$HEADER" https://api.github.com/repos/${{ github.repository }}/releases/tags/$LATEST_VERSION$ARCH)
|
||||||
# echo "Release ID: $RELEASE_ID"
|
RELEASE_ID=$(echo $RELEASE_INFO | jq -r '.id')
|
||||||
# if [ "$RELEASE_ID" != "null" ]; then
|
echo "Release ID: $RELEASE_ID"
|
||||||
# curl -X DELETE -H "$HEADER" https://api.github.com/repos/${{ github.repository }}/git/refs/tags/$LATEST_VERSION$ARCH
|
if [ "$RELEASE_ID" != "null" ]; then
|
||||||
# echo "Tag $LATEST_VERSION$ARCH deleted successfully."
|
curl -X DELETE -H "$HEADER" https://api.github.com/repos/${{ github.repository }}/git/refs/tags/$LATEST_VERSION$ARCH
|
||||||
# curl -X DELETE -H "$HEADER" https://api.github.com/repos/${{ github.repository }}/releases/$RELEASE_ID
|
echo "Tag $LATEST_VERSION$ARCH deleted successfully."
|
||||||
# echo "Release with tag $LATEST_VERSION$ARCH deleted successfully."
|
curl -X DELETE -H "$HEADER" https://api.github.com/repos/${{ github.repository }}/releases/$RELEASE_ID
|
||||||
# else
|
echo "Release with tag $LATEST_VERSION$ARCH deleted successfully."
|
||||||
# echo "Release not found for tag: $LATEST_VERSION)"
|
else
|
||||||
# fi
|
echo "Release not found for tag: $LATEST_VERSION)"
|
||||||
|
fi
|
||||||
|
|
||||||
# - name: Create Release tag ${{ env.LATEST_VERSION }} ${{ env.ARCH }}
|
- name: Create Release tag ${{ env.LATEST_VERSION }} ${{ env.ARCH }}
|
||||||
# if: steps.get_latest.outputs.has_new_version == 'true' && env.RELEASE == 'true'
|
if: steps.get_latest.outputs.has_new_version == 'true' && env.RELEASE == 'true'
|
||||||
# uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
# with:
|
with:
|
||||||
# name: "RouterOS ${{ env.LATEST_VERSION }} ${{ env.ARCH }}"
|
name: "RouterOS ${{ env.LATEST_VERSION }} ${{ env.ARCH }}"
|
||||||
# body_path: "CHANGELOG"
|
body_path: "CHANGELOG"
|
||||||
# tag_name: ${{ env.LATEST_VERSION }}${{ env.ARCH }}
|
tag_name: ${{ env.LATEST_VERSION }}${{ env.ARCH }}
|
||||||
# make_latest: ${{ matrix.channel == 'stable'}} && ${{ matrix.arch == 'x86'}}
|
make_latest: ${{ matrix.channel == 'stable'}} && ${{ matrix.arch == 'x86'}}
|
||||||
# prerelease: ${{ matrix.channel == 'testing' }}
|
prerelease: ${{ matrix.channel == 'testing' }}
|
||||||
# files: |
|
files: |
|
||||||
# mikrotik-${{ env.LATEST_VERSION }}${{ env.ARCH }}.iso
|
mikrotik-${{ env.LATEST_VERSION }}${{ env.ARCH }}.iso
|
||||||
# chr-${{ env.LATEST_VERSION }}*.zip
|
chr-${{ env.LATEST_VERSION }}*.zip
|
||||||
# netinstall-${{ env.LATEST_VERSION }}.*
|
netinstall-${{ env.LATEST_VERSION }}.*
|
||||||
# install-image-${{ env.LATEST_VERSION }}.zip
|
install-image-${{ env.LATEST_VERSION }}.zip
|
||||||
# routeros-${{ env.LATEST_VERSION }}${{ env.ARCH }}.npk
|
routeros-${{ env.LATEST_VERSION }}${{ env.ARCH }}.npk
|
||||||
# all_packages-*-${{ env.LATEST_VERSION }}.zip
|
all_packages-*-${{ env.LATEST_VERSION }}.zip
|
||||||
|
|
||||||
- name: Upload Files as Artifact (No Release)
|
- name: Upload Files as Artifact (No Release)
|
||||||
if: steps.get_latest.outputs.has_new_version == 'true' && env.RELEASE == 'false'
|
if: steps.get_latest.outputs.has_new_version == 'true' && env.RELEASE == 'false'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user