Eliminar .github/workflows/sync-github.yml
This commit is contained in:
49
.github/workflows/sync-github.yml
vendored
49
.github/workflows/sync-github.yml
vendored
@@ -1,49 +0,0 @@
|
||||
name: Sync selected files to GitHub
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
commit_message:
|
||||
description: 'Mensaje del commit en GitHub'
|
||||
required: false
|
||||
default: 'Sync selected files from Gitea'
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: node:20-bullseye
|
||||
options: >-
|
||||
--dns 192.168.1.1
|
||||
--add-host git.natxocc.com:host-gateway
|
||||
--add-host gitea:host-gateway
|
||||
|
||||
steps:
|
||||
- name: Clone source from Gitea
|
||||
run: |
|
||||
git clone https://git.natxocc.com/natxocc/sigpro.git source
|
||||
cd source
|
||||
git checkout main
|
||||
|
||||
- name: Clone destination from GitHub
|
||||
run: |
|
||||
git clone https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/natxocc/sigpro.git dest
|
||||
cd dest
|
||||
git config user.name "Sync Bot"
|
||||
git config user.email "bot@natxocc.com"
|
||||
|
||||
- name: Copy selected files
|
||||
run: |
|
||||
FILES="sigpro.js"
|
||||
for file in $FILES; do
|
||||
if [ -f "source/$file" ]; then
|
||||
mkdir -p "dest/$(dirname $file)"
|
||||
cp "source/$file" "dest/$file"
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Commit and push to GitHub
|
||||
run: |
|
||||
cd dest
|
||||
git add .
|
||||
git diff --staged --quiet || (git commit -m "${{ github.event.inputs.commit_message }}" && git push origin main)
|
||||
Reference in New Issue
Block a user