feat(actions): rename workflow file and update asset paths for Gitea compatibility
This commit is contained in:
55
.github/workflows/version-assets.yml
vendored
55
.github/workflows/version-assets.yml
vendored
@@ -1,55 +0,0 @@
|
||||
name: Version Static Assets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'www/script.js'
|
||||
- 'www/styles.css'
|
||||
- 'www/logo.png'
|
||||
- 'www/index.html'
|
||||
- 'version-assets.sh'
|
||||
- '.github/workflows/version-assets.yml'
|
||||
|
||||
jobs:
|
||||
version-assets:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Delete old versioned assets
|
||||
run: |
|
||||
echo "🗑️ Borrando archivos hasheados antiguos..."
|
||||
rm -f www/*.*.js www/*.*.css www/*.*.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 www/*.*.js www/*.*.css www/*.*.png www/index.html
|
||||
git commit -m "chore: update asset versions [skip ci]"
|
||||
git push
|
||||
Reference in New Issue
Block a user