Skip to content

build(deps): bump actions/checkout from 4.1.2 to 4.1.4 #1410

build(deps): bump actions/checkout from 4.1.2 to 4.1.4

build(deps): bump actions/checkout from 4.1.2 to 4.1.4 #1410

Workflow file for this run

name: Vagrant Playbook Checker
on:
pull_request:
paths:
- .github/workflows/build_vagrant.yml
- ansible/playbooks/AdoptOpenJDK_Unix_Playbook/**
branches:
- master
# Cancel existing runs if user makes another push.
concurrency:
group: "${{ github.ref }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
build-solaris:
name: Solaris
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Update Repos
run: sudo apt-get update
- name: Install Ansible
run: sudo apt-get install ansible
- name: Install VirtualBox
run: sudo apt-get install virtualbox
- name: Install Vagrant
run: sudo apt-get install vagrant
- name: Cache Solaris10.box
id: solaris-10-cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: Solaris10.box
key: sol10boxcache
- name: Download Solaris 10 Box If Cache Misses
if: steps.solaris-10-cache.outputs.cache-hit != 'true'
run: wget https://ci.adoptium.net/userContent/vagrant/Solaris10.box.gz
- name: Verify Checksum If Cache Misses
if: steps.solaris-10-cache.outputs.cache-hit != 'true'
run: |
CKSUM=`shasum -a 256 ./Solaris10.box.gz|cut -d" " -f1`
if [ "$CKSUM" = "0879215f4bf03f5e125addb139d0b5a49a4f8a258297b765cf1f22a8a7ee3309" ]
then
echo "Checksum OK"
else
echo "Sum Bad"
exit 99;
fi
- name: Extract Solaris10.box.gz If Cache Misses
if: steps.solaris-10-cache.outputs.cache-hit != 'true'
run: gunzip Solaris10.box.gz
- name: Add Solaris 10 Box To Vagrant
run: vagrant box add --name="solaris10" ./Solaris10.box
- name: Setup Vagrant VM
working-directory: ansible
run: |
ln -sf vagrant/Vagrantfile.Solaris10 Vagrantfile
rm -f id_rsa.pub id_rsa
# Copy the machine's ssh key for the VMs to use, after removing prior files
ssh-keygen -q -f $PWD/id_rsa -t rsa -N ''
vagrant plugin install vagrant-vbguest
vagrant up
vagrantPORT=$(vagrant port | grep host | awk '{ print $4 }')
rm -f playbooks/AdoptOpenJDK_Unix_Playbook/hosts.unx
echo "[127.0.0.1]:${vagrantPORT}" >> playbooks/AdoptOpenJDK_Unix_Playbook/hosts.unx
[ ! -d $HOME/.ssh ] && mkdir $HOME/.ssh && chmod 700 $HOME/.ssh
[ ! -r $HOME/.ssh/known_hosts ] && touch $HOME/.ssh/known_hosts && chmod 644 $HOME/.ssh/known_hosts
[ ! -d $HOME/.ansible ] && mkdir $HOME/.ansible
ssh-keygen -R $(cat playbooks/AdoptOpenJDK_Unix_Playbook/hosts.unx)
sed -i -e "s/.*hosts:.*/ hosts: all/g" playbooks/AdoptOpenJDK_Unix_Playbook/main.yml
awk '{print}/^\[defaults\]$/{print "private_key_file = id_rsa"; print "timeout = 60"; print "remote_tmp = $HOME/.ansible/tmp"}' < ansible.cfg > ansible.cfg.tmp && mv ansible.cfg.tmp ansible.cfg
- name: Run Ansible Playbook
working-directory: ansible
run: ansible-playbook -i playbooks/AdoptOpenJDK_Unix_Playbook/hosts.unx --ssh-common-args='-o HostKeyAlgorithms=ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519 -o PubKeyAcceptedKeyTypes=ssh-rsa' -u vagrant -b --skip-tags adoptopenjdk,cups playbooks/AdoptOpenJDK_Unix_Playbook/main.yml