use pkgbase-yaml-parser
This commit is contained in:
40
action.yml
40
action.yml
@@ -15,23 +15,59 @@ runs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Get pkgbase versions
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
git reset --hard HEAD~1 && \
|
||||||
|
cp .artixlinux/pkgbase.yaml ./pkgbase.previous.yaml && \
|
||||||
|
git pull && \
|
||||||
|
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
|
||||||
|
current: .artixlinux/pkgbase.yaml
|
||||||
|
|
||||||
|
- name: Move package
|
||||||
|
uses: https://git.sanin.dev/packages_test/pkgbase-yaml-parser@master
|
||||||
|
if: ${{ steps.parsed.outputs.move }}
|
||||||
|
with:
|
||||||
|
mode: move
|
||||||
|
parsed-data: ${{ steps.parsed.outputs.parsed-data }}
|
||||||
|
username: "${{ inputs.username }}"
|
||||||
|
token: ${{ inputs.token }}
|
||||||
|
|
||||||
- name: Create publish script
|
- name: Create publish script
|
||||||
shell: bash
|
shell: bash
|
||||||
|
if: ${{ steps.parsed.outputs.build }}
|
||||||
run: |
|
run: |
|
||||||
echo "#!/bin/bash
|
echo "#!/bin/bash
|
||||||
echo '📤️ Uploading package to ${{ gitea.server_url }} ...'
|
echo '📤️ Uploading package to ${{ gitea.server_url }} ...'
|
||||||
curl -f --user \"\$username:\$token\" \
|
curl -f --user \"\$username:\$token\" \
|
||||||
--upload-file ./*.tar.zst \
|
--upload-file ./*.tar.zst \
|
||||||
'${{ gitea.server_url }}/api/packages/packages_test/arch/microverse'
|
'${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/arch/${{ steps.parsed.outputs.destination }}'
|
||||||
" > "./post-entrypoint.sh"
|
" > "./post-entrypoint.sh"
|
||||||
chmod +x "./post-entrypoint.sh"
|
chmod +x "./post-entrypoint.sh"
|
||||||
git config --global user.name 'Guy Incognito'
|
git config --global user.name 'Guy Incognito'
|
||||||
git config --global user.email 'user@local'
|
git config --global user.email 'user@local'
|
||||||
git add "./post-entrypoint.sh"
|
git add "./post-entrypoint.sh"
|
||||||
git commit -m "fuck you, gitea"
|
git commit -m "persist publish script"
|
||||||
|
|
||||||
- name: Build package
|
- name: Build package
|
||||||
uses: https://git.sanin.dev/packages_test/build-publish/@build
|
uses: https://git.sanin.dev/packages_test/build-publish/@build
|
||||||
|
if: ${{ steps.parsed.outputs.build }}
|
||||||
with:
|
with:
|
||||||
username: "${{ inputs.username }}"
|
username: "${{ inputs.username }}"
|
||||||
token: ${{ inputs.token }}
|
token: ${{ inputs.token }}
|
||||||
|
|
||||||
|
- name: Delete package
|
||||||
|
uses: https://git.sanin.dev/packages_test/pkgbase-yaml-parser@master
|
||||||
|
if: ${{ steps.parsed.outputs.delete }}
|
||||||
|
with:
|
||||||
|
mode: delete
|
||||||
|
parsed-data: ${{ steps.parsed.outputs.parsed-data }}
|
||||||
|
username: "${{ inputs.username }}"
|
||||||
|
token: ${{ inputs.token }}
|
||||||
|
|||||||
Reference in New Issue
Block a user