switch gitea action to using dropshell to publish
Some checks failed
Test and Publish Templates / test-and-publish (push) Failing after 4s

This commit is contained in:
j
2025-12-28 12:18:53 +13:00
parent d07dd8236f
commit 97206507f9
2 changed files with 6 additions and 206 deletions

View File

@@ -18,51 +18,21 @@ jobs:
- name: Install dependencies
run: |
# Install sos tool for uploading
curl -o /tmp/sos https://getbin.xyz/sos:latest && chmod +x /tmp/sos
sudo mv /tmp/sos /usr/local/bin/sos
# Install dropshell
curl -fsSL https://getbin.xyz/dropshell-install | bash
~/.local/bin/dropshell install
# Install jq for JSON parsing
which jq || sudo apt-get update && sudo apt-get install -y jq
# Install tar for packaging
which tar || sudo apt-get update && sudo apt-get install -y tar
# Install xxhash for calculating template hashes
which xxhsum || sudo apt-get update && sudo apt-get install -y xxhash
- name: Run tests
run: |
chmod +x test.sh
./test.sh
- name: Detect changed templates
id: changes
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
chmod +x detect-changes.sh
CHANGED_TEMPLATES=$(./detect-changes.sh)
if [ -z "$CHANGED_TEMPLATES" ]; then
echo "No templates have changed"
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "Changed templates: $CHANGED_TEMPLATES"
echo "changed=true" >> $GITHUB_OUTPUT
# Store changed templates for the next step
echo "$CHANGED_TEMPLATES" > changed_templates.txt
fi
- name: Publish changed templates
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && steps.changes.outputs.changed == 'true'
run: |
chmod +x publish.sh
# Publish only changed templates
SOS_WRITE_TOKEN=${{ secrets.SOS_WRITE_TOKEN }} \
./publish.sh --changed-only
- name: Update versions after successful publish
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && steps.changes.outputs.changed == 'true'
run: |
# This step would normally commit the updated versions.json
# But we'll leave this for manual version bumping
echo "Templates published successfully. Consider bumping versions in versions.json for the changed templates."
SOS_WRITE_TOKEN=${{ secrets.SOS_WRITE_TOKEN }} ~/.local/bin/dropshell publish -all ./