use tags
This commit is contained in:
28
action.yml
28
action.yml
@@ -14,25 +14,12 @@ runs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Get pkgbase versions
|
||||
shell: bash
|
||||
run: |
|
||||
git reset --hard HEAD~1 && \
|
||||
cp .artixlinux/pkgbase.yaml ./pkgbase.previous.yaml && \
|
||||
git pull && \
|
||||
git config --global user.name 'Guy Incognito' && \
|
||||
git config --global user.email 'user@local' && \
|
||||
git add ./pkgbase.previous.yaml && \
|
||||
git commit -m "add previous pkgbase"
|
||||
|
||||
- name: Parse pkgbase
|
||||
uses: https://git.sanin.dev/packages_test/pkgbase-yaml-parser@master
|
||||
id: parsed
|
||||
with:
|
||||
previous: pkgbase.previous.yaml
|
||||
previous: ${{ gitea.server_url }}/${{ gitea.repository }}/raw/tag/latest/.artixlinux/pkgbase.yaml
|
||||
current: .artixlinux/pkgbase.yaml
|
||||
|
||||
- name: Move package
|
||||
@@ -70,6 +57,11 @@ runs:
|
||||
username: "${{ inputs.username }}"
|
||||
token: ${{ inputs.token }}
|
||||
|
||||
- name: Revert publish script
|
||||
shell: bash
|
||||
if: ${{ steps.parsed.outputs.build == 'true' }}
|
||||
run: git reset --hard HEAD~1
|
||||
|
||||
- name: Delete package
|
||||
uses: https://git.sanin.dev/packages_test/pkgbase-yaml-parser@master
|
||||
if: ${{ steps.parsed.outputs.delete == 'true' }}
|
||||
@@ -78,3 +70,11 @@ runs:
|
||||
parsed-data: ${{ steps.parsed.outputs.parsed-data }}
|
||||
username: "${{ inputs.username }}"
|
||||
token: ${{ inputs.token }}
|
||||
|
||||
- name: Update latest tag
|
||||
shell: bash
|
||||
run: |
|
||||
git config user.name "Gitea CI"
|
||||
git config user.email "ci@gitea.local"
|
||||
git tag -f latest
|
||||
git push origin -f latest
|
||||
|
||||
Reference in New Issue
Block a user