diff --git a/.github/workflows/new_offer.yml b/.github/workflows/new_offer.yml new file mode 100644 index 00000000..c674e945 --- /dev/null +++ b/.github/workflows/new_offer.yml @@ -0,0 +1,46 @@ +name: Comment on PR + +on: + pull_request: + types: + - opened + - synchronize + +jobs: + comment_on_pr: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Check for changes in ofertas.ts + id: check_changes + run: | + # Check if the 'pages/empleo/ofertas.ts' file is modified in the pull request + if git diff -q ${{ github.base_ref }}...${{ github.head_ref }} -- "pages/empleo/ofertas.ts"; then + echo "Changes found in ofertas.ts" + echo "::set-output name=changes::true" + else + echo "No changes in ofertas.ts" + echo "::set-output name=changes::false" + fi + + - name: Comment on PR if there are changes in ofertas.ts + if: steps.check_changes.outputs.changes == 'true' + uses: actions/github-script@v4 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + try { + const message = `Hey there! It looks like there are new changes in 'ofertas.ts'. Please review the updates. Thank you!`; + + github.issues.createComment({ + issue_number: context.payload.pull_request.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: message, + }); + } catch (error) { + console.error('Error posting comment:', error.message); + } diff --git a/pages/empleo/ofertas.ts b/pages/empleo/ofertas.ts index 03958ade..6f378081 100644 --- a/pages/empleo/ofertas.ts +++ b/pages/empleo/ofertas.ts @@ -1,5 +1,16 @@ // Para añadir una nueva oferta, crea una constante con la información correspondiente y añádela a la lista `ofertas` al final del archivo. +const llmops_clibrain = { + ocupación: 'Senior Infrastructure Engineer', + "palabras clave": 'Investigación, PhD, Chatbots', + contrato: 'T.Completo (21.000 €/año)', + entidad: 'Clibrain', + "nº trabajadores/as": '10 - 49', + localización: 'Madrid', + "fecha publicación (fecha límite)": '2023/07/25 (2023/10/01)', + más: 'https://mcyt.educa.madrid.org/empleo/inscripcionDemandaProfesional/mostrar_oferta.asp?codigo=49815' +} + const phd_etsi_upm = { ocupación: 'Scholarship for PhD studies', "palabras clave": 'Investigación, PhD, Chatbots',