Skip to content

Bump actions/checkout from 4.1.1 to 4.1.5 #205

Bump actions/checkout from 4.1.1 to 4.1.5

Bump actions/checkout from 4.1.1 to 4.1.5 #205

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
jobs:
run_all_roles:
name: Run all ICAT Ansible roles
runs-on: ubuntu-22.04
strategy:
matrix:
java_version: [11, 17]
steps:
- name: Checkout ICAT Ansible
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Run apt update
run: sudo apt-get update
- name: Install requirements
run: pip install -r requirements.txt
# Prep for running the playbook
- name: Create hosts file
run: echo -e "[hosts_all]\nlocalhost ansible_connection=local" > hosts
- name: Prepare vault pass
run: echo -e "icattravispw" > vault_pass.txt
- name: Move vault to directory it'll get detected by Ansible
run: mv vault.yml group_vars/all
- name: Replace default payara user with Actions user
run: |
sed -i -e "s/^payara_user: \"glassfish\"/payara_user: \"runner\"/" group_vars/all/vars.yml
# Force hostname to localhost - bug fix for previous ICAT Ansible issues on Actions
- name: Change hostname to localhost
run: sudo hostname -b localhost
- name: Remove existing mysql
run: |
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
sudo apt-get remove --purge "mysql*"
sudo rm -rf /var/lib/mysql* /etc/mysql
- name: Run ICAT Ansible Playbook
run: |
ansible-playbook hosts_all.yml -i hosts --vault-password-file vault_pass.txt -e java_version=${{ matrix.java_version }} -vv