initial commit

This commit is contained in:
2025-11-09 16:35:46 -05:00
commit 3781969c32
3 changed files with 175 additions and 0 deletions

59
.artixlinux/pkgbase.yaml Normal file
View File

@@ -0,0 +1,59 @@
---
team: world
actions:
addRepo: null
removeRepo: null
triggersBuild: false
triggersRebuild: false
triggersRepoAdd: false
triggersRepoRemove: false
triggersNoCheck: false
repos:
system-goblins:
version: null
packages: []
debug: []
system-gremlins:
version: null
packages: []
debug: []
system:
version: null
packages: []
debug: []
world-goblins:
version: null
packages: []
debug: []
world-gremlins:
version: null
packages: []
debug: []
world:
version: null
packages: []
debug: []
lib32-goblins:
version: null
packages: []
debug: []
lib32-gremlins:
version: null
packages: []
debug: []
lib32:
version: null
packages: []
debug: []
galaxy-goblins:
version: null
packages: []
debug: []
galaxy-gremlins:
version: null
packages: []
debug: []
galaxy:
version: null
packages: []
debug: []

View File

@@ -0,0 +1,96 @@
name: Publish
on:
push:
branches:
- master
jobs:
check-workflow:
runs-on: ubuntu-latest
name: Check workflow
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Retrieve latest
run: curl -o ".gitea/workflows/publish.yml" "${{ gitea.server_url }}/${{ gitea.repository }}/raw/branch/master/.gitea/workflows/publish.yml"
- name: check for diff
run: git update-index --refresh
build:
needs: check-workflow
runs-on: ubuntu-latest
name: Build and publish
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Parse pkgbase
uses: ${{ gitea.server_url }}/${{ gitea.repository_owner }}/pkgbase-yaml-parser@4a8498f97548b099c71519fb39e839bcd96294d2
id: parsed
with:
previous: ${{ gitea.server_url }}/${{ gitea.repository }}/raw/tag/latest/.artixlinux/pkgbase.yaml
current: .artixlinux/pkgbase.yaml
- name: Move package
uses: ${{ gitea.server_url }}/${{ gitea.repository_owner }}/pkgbase-yaml-parser@4a8498f97548b099c71519fb39e839bcd96294d2
if: ${{ steps.parsed.outputs.move == 'true' }}
with:
mode: move
parsed-data: ${{ steps.parsed.outputs.parsed-data }}
username: "${{ inputs.username }}"
token: ${{ inputs.token }}
- name: Create publish script
shell: bash
if: ${{ steps.parsed.outputs.build == 'true' }}
run: |
echo "#!/bin/bash
echo '📤️ Uploading package to ${{ gitea.server_url }} ...'
for f in ./*.tar.zst; do
[ -f \"\$f\" ] || continue
curl -f --user \"\$username:\$token\" \
--upload-file \"\$f\" \
'${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/arch/${{ steps.parsed.outputs.destination }}'
done
" > "./post-entrypoint.sh"
chmod +x "./post-entrypoint.sh"
git config --global user.name 'Guy Incognito'
git config --global user.email 'user@local'
git add "./post-entrypoint.sh" && \
git commit -m "persist publish script" && \
cat "./post-entrypoint.sh"
- name: Build package
uses: ${{ gitea.server_url }}/${{ gitea.repository_owner }}/build-publish/@build
if: ${{ steps.parsed.outputs.build == 'true' }}
with:
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: ${{ gitea.server_url }}/${{ gitea.repository_owner }}/pkgbase-yaml-parser@4a8498f97548b099c71519fb39e839bcd96294d2
if: ${{ steps.parsed.outputs.delete == 'true' }}
with:
mode: delete
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

20
.gitignore vendored Normal file
View File

@@ -0,0 +1,20 @@
# ---> ArtixLinuxPackages
*.tar
*.tar.*
*.jar
*.exe
*.msi
*.zip
*.tgz
*.log
*.log.*
*.sig
pkg/
src/
*.service
*.timer
*.socket