-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (55 loc) · 2.26 KB
/
10min-iiab-test-install.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: '"10 min" IIAB test install'
# run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
# https://michaelcurrin.github.io/dev-cheatsheets/cheatsheets/ci-cd/github-actions/triggers.html
on: [push, pull_request, workflow_dispatch]
# on:
# push:
#
# pull_request:
#
# # Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:
#
# # Set your workflow to run every day of the week from Monday to Friday at 6:00 UTC
# schedule:
# - cron: "0 6 * * 1-5"
jobs:
test-install:
runs-on: ubuntu-24.04
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
#- name: Dump GitHub context (typically almost 500 lines)
# env:
# GITHUB_CONTEXT: ${{ toJSON(github) }}
# run: echo "$GITHUB_CONTEXT"
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "🍏 This job's status is ${{ job.status }}."
- name: GitHub Actions "runner" environment
run: |
uname -a # uname -srm
whoami # Typically 'runner' instead of 'root'
pwd # /home/runner/work/iiab/iiab == $GITHUB_WORKSPACE == ${{ github.workspace }}
# ls
# ls $GITHUB_WORKSPACE
# ls ${{ github.workspace }}
# ls -la /opt # az, containerd, google, hostedtoolcache, microsoft, mssql-tools, pipx, pipx_bin, post-generation, runner, vsts
# apt update
# apt dist-upgrade -y
# apt autoremove -y
- name: Set up /opt/iiab/iiab
run: |
mkdir /opt/iiab
mv $GITHUB_WORKSPACE /opt/iiab
mkdir $GITHUB_WORKSPACE # OR SUBSEQUENT STEPS WILL FAIL ('working-directory: /opt/iiab/iiab' hacks NOT worth it!)
- name: Set up /etc/iiab/local_vars.yml
run: |
sudo mkdir /etc/iiab
# touch /etc/iiab/local_vars.yml
sudo cp /opt/iiab/iiab/vars/local_vars_none.yml /etc/iiab/local_vars.yml
- run: sudo /opt/iiab/iiab/scripts/ansible
- run: sudo ./iiab-install
working-directory: /opt/iiab/iiab
- run: iiab-summary
- run: cat /etc/iiab/iiab_state.yml