GLV OnAir Ottobre 2019
In questa introduzione a GitHub Actions: vedremo gli elementi base, cosa è possibile fare, cosa invece si rivela complicato o impossibile da fare, come trovare informazioni ed esempi.
4. Motore di build
The Linux and Windows GitHub Actions virtual environments
are hosted on Standard_DS2_v2 virtual machines in Microsoft
Azure with the GitHub Actions runner installed. The GitHub
Actions runner is a fork of the Azure Pipelines Agent.
17. Docker action
Per ora solo Linux
Lancia il container (docker run)
Monta la radice del repo in /github/workspace
Immagine da Registry pubblico
Potenzialmente lento
20. User action
JavaScript (Node.js 12)
Stesso o altro repo pubblico
github.com/actions
Non c’è ancora un catalogo organizzato
Automatizzare il lavoro in GitHub (issues, PRs)
Cloud (AWS, Azure, GCP, Heroku, …)
23. Environment variables
steps:
- name: Hello world
run: echo Hello world %FIRST_NAME% %middle_name%
%Last_Name%!
env:
FIRST_NAME: Mona
middle_name: The
Last_Name: Octocat
24. Environment variables
steps:
- name: Hello world
shell: pwsh
run: echo Hello world ${FIRST_NAME}
${middle_name} ${Last_Name}!
env:
FIRST_NAME: Mona
middle_name: The
Last_Name: Octocat
25. Environment variables
steps:
- name: Hello world
shell: bash
run: echo Hello world ${FIRST_NAME}
${middle_name} ${Last_Name}!
env:
FIRST_NAME: Mona
middle_name: The
Last_Name: Octocat
26. Environment variables
A livello di workflow o job o step
Per impostare via codice
echo ::set-env name={name}::{value}
Per mascherare valori
echo ::add-mask::{value}
33. Bugiardino
Exceeding usage limits may result in jobs
queueing, failing to run, or failing to complete.
Limits are subject to change.
You can execute up to 20 workflows
concurrently per repository.
You can execute up to 1000 API requests in an
hour across all actions within a repository.
Each job in a workflow can run for up to 6 hours
of execution time.
You can run up to 20 jobs concurrently per
repository across all workflows.