conditionals #16
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: '"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-latest | |
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/[email protected] | |
- 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 |