packer: add workflow to automatically update orka images #1
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: Packer | |
on: | |
push: | |
paths: | |
- .github/workflows/packer.yml | |
- ansible/playbooks/AdoptOpenJDK_Unix_Playbook/** | |
- ansible/packer/** | |
branches: | |
- master | |
jobs: | |
packer: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Install openconnect | |
run: sudo apt-get install -y openconnect | |
- name: Connect to Orka VPN | |
run: | | |
echo ${{ secrets.ORKA_VPN_PASSWORD }} | sudo openconnect 207.254.69.34 \ | |
--protocol=anyconnect --user=${{ secrets.ORKA_VPN_USERNAME }} \ | |
--passwd-on-stdin --background \ | |
--servercert ${{ secrets.ORKA_VPN_SERVER_CERT }} | |
- name: Run Packer | |
run: packer build orka.pkr.hcl | |
working-directory: ansible/packer | |
env: | |
ORKA_TOKEN: ${{ secrets.ORKA_TOKEN }} |