-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprepare_env.yml
30 lines (30 loc) · 1.31 KB
/
prepare_env.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
- hosts: all
tasks:
- name: show parameters coming from github
debug:
msg: "Request coming from github: |
actor: {{ github_actor | default('undefined') }}
repo: {{ github_repository | default('undefined') }}
workflow: {{ github_workflow | default('undefined') }} workspace: {{ github_workspace | default('undefined') }} event_name: {{ github_event_name | default('undefined') }} event_path: {{ github_event_path | default('undefined') }}
sha: {{ github_sha | default('undefined') }}
ref: {{ github_ref | default('undefined') }}
head_ref: {{ github_head_ref | default('undefined') }}
base_ref: {{ github_base_ref | default('undefined')}}
server_url: {{ github_server_url | default('undefined')}}
"
- fail:
msg: Server URL is not authorized to run this job.
when: github_server_url != "https://github.com"
- fail:
msg: Repository is not authorized to run this job.
when: not "scaphandre" in github_repository
- name: rustup downloaded
get_url:
url: https://sh.rustup.rs
dest: .
force: no
mode: 0775
register: rustup_downloaded
- name: rust installed
shell: ./rustup-init.sh -y
when: rustup_downloaded.changed is defined and rustup_downloaded.changed