├── hola.txt ├── readme.md └── .github └── workflows ├── strategy.yml ├── steps.yml └── deploy.yml /hola.txt: -------------------------------------------------------------------------------- 1 | Hola 2 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Hola -------------------------------------------------------------------------------- /.github/workflows/strategy.yml: -------------------------------------------------------------------------------- 1 | name: Workflow strategy 2 | 3 | on: push 4 | 5 | jobs: 6 | first_job: 7 | runs-on: ubuntu-latest 8 | 9 | strategy: 10 | matrix: 11 | message: ["Hola", "CodigoFacilito", "Bootcamp GitHub Action"] 12 | 13 | steps: 14 | - name: Print mensaje 15 | run: echo "${{ matrix.message }}" -------------------------------------------------------------------------------- /.github/workflows/steps.yml: -------------------------------------------------------------------------------- 1 | name: Workflow step 2 | 3 | on: [push] 4 | 5 | jobs: 6 | first_job: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - name: Cd a directorio 11 | uses: actions/checkout@v3 12 | 13 | - name: HOLA MUNDO 14 | run: echo "HOLA MUNDO" 15 | 16 | second_job: 17 | runs-on: ubuntu-latest 18 | if: true 19 | needs: first_job 20 | 21 | steps: 22 | - name: INSTALAR DEPENDENCIAS 23 | run: echo "INSTALANDO DEPENDENCIAS ..." 24 | -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: Deploy to server 2 | 3 | on: push 4 | 5 | jobs: 6 | first_job: 7 | runs-on: ubuntu-latest 8 | 9 | outputs: 10 | salida: ${{ steps.step_1.outputs.my_variable }} 11 | 12 | steps: 13 | - name: Generar archivo 14 | run: | 15 | echo "Archivo prueba, hola" >> test.log 16 | 17 | - name: Subir artefacto 18 | uses: actions/upload-artifact@v4 19 | with: 20 | name: archivo-test 21 | path: test.log 22 | 23 | segundo_job: 24 | runs-on: ubuntu-latest 25 | needs: first_job 26 | 27 | steps: 28 | - name: Descargar artefacto 29 | uses: actions/download-artifact@v4 30 | with: 31 | name: archivo-test 32 | 33 | - name: Cat file 34 | run: cat test.log --------------------------------------------------------------------------------