🖼️ Capturas de pantalla #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🖼️ Capturas de pantalla | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 1 * *' # Cada mes el primer día a las 00:00 | |
jobs: | |
generate_screenshots: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Inicializar Github Action | |
uses: actions/checkout@v4 | |
- name: Instalar Golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
- name: Obtener los enlaces | |
run: go run ./assets/go/markdown-link-extractor/main.go | |
working-directory: ${{ github.workspace }} | |
id: extraer_enlaces | |
- name: Download Go modules | |
run: | | |
echo "Downloading Go modules" | |
echo "$(pwd)" | |
go mod download | |
working-directory: ${{ github.workspace }}/assets/go/website-screenshot-generator | |
- name: Generar y guardas capturas | |
run: go run ./main.go | |
working-directory: ${{ github.workspace }}/assets/go/website-screenshot-generator | |
id: generar_capturas | |
env: | |
GITHUB_TOKEN: ${{ secrets.COMMITS_ALLOWED }} | |
- name: Establecer variable de entorno con el hash corto del commit | |
id: vars | |
run: | | |
echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
echo ${{ env.SHA_SHORT }} | |
- name: Crear Pull Request | |
uses: peter-evans/[email protected] | |
with: | |
commit-message: 'content: Capturas de pantalla actualizadas' | |
title: '🤖 Capturas de pantalla' | |
branch: auto-act-${{ env.SHA_SHORT }} | |
delete-branch: true | |
labels: auto-act | |
base: master | |
token: ${{ secrets.COMMITS_ALLOWED }} |