Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
Create Reviw-Rover.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
livrasand authored Oct 16, 2023
1 parent c5506f5 commit 7ca9fe6
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/Reviw-Rover.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Create ZIP of pull request

on:
pull_request:
types: [opened, synchronize]

jobs:
create-zip:
runs-on: ubuntu-latest
steps:
- name: Clonar repositorio
uses: actions/checkout@v2

- name: Extraer información de publications.js
run: |
repositoryURL=$(jq -e -r '.repositoryURL' publications.json)
language=$(jq -e -r '.language' publications.json)
symbol=$(jq -e -r '.symbol' publications.json)
year=$(jq -e -r '.year' publications.json)
echo "```
{
"repositoryURL": "${{repositoryURL}}",
"branch": "${{ github.event.pull_request.head.ref }}",
"author": "${{ github.event.pull_request.head.user.login }}"
"language": "${language}",
"symbol": "${symbol}",
"year": "${year}"
}
```" > publications.js
- name: Visitar repositorio del autor
run: |
git clone "${{ github.event.pull_request.head.repo.clone_url }}"
- name: Crear archivo ZIP
run: |
zip -r publications.zip publications.js
- name: Subir archivo ZIP
uses: actions/upload-artifact@v2
with:
name: publications
path: publications.zip

- name: Agregar archivo ZIP a la conversación de la solicitud de extracción
run: |
# Utiliza la API de GitHub para agregar un comentario con el archivo ZIP
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
-d '{
"body": "Aquí tienes el archivo ZIP de la solicitud de extracción:",
"files": {
"publications.zip": "path/to/publications.zip"
}
}'
- name: Eliminar archivo ZIP
run: |
rm publications.zip

0 comments on commit 7ca9fe6

Please sign in to comment.