Chore: Changing from github actions to gitea actions only.
Some checks failed
Version Static Assets / version-assets (push) Failing after 14s
Some checks failed
Version Static Assets / version-assets (push) Failing after 14s
This commit is contained in:
54
.gitea/workflows/version-assets.yml
Normal file
54
.gitea/workflows/version-assets.yml
Normal file
@@ -0,0 +1,54 @@
|
||||
name: Version Static Assets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'script.js'
|
||||
- 'styles.css'
|
||||
- 'logo.png'
|
||||
- 'index.html'
|
||||
- 'version-assets.sh'
|
||||
- '.github/workflows/version-assets.yml'
|
||||
|
||||
jobs:
|
||||
version-assets:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.APP_SECRET }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Delete old versioned assets
|
||||
run: |
|
||||
echo "🗑️ Borrando archivos hasheados antiguos..."
|
||||
rm -f *.*.js *.*.css *.*.png || true
|
||||
git add -A
|
||||
|
||||
- name: Run asset versioning
|
||||
run: |
|
||||
chmod +x version-assets.sh
|
||||
./version-assets.sh
|
||||
|
||||
- name: Check for changes
|
||||
id: check_changes
|
||||
run: |
|
||||
if git diff --quiet && git diff --cached --quiet; then
|
||||
echo "changes=false" >> $GITHUB_OUTPUT
|
||||
echo "No hay cambios para commitear"
|
||||
else
|
||||
echo "changes=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Commit and push versioned assets
|
||||
if: steps.check_changes.outputs.changes == 'true'
|
||||
run: |
|
||||
git config --local user.email "ci@dariosevilla.es"
|
||||
git config --local user.name "CI Action"
|
||||
git add *.*.js *.*.css *.*.png index.html
|
||||
git commit -m "chore: update asset versions [skip ci]"
|
||||
git push
|
||||
Reference in New Issue
Block a user