Skip to content

Commit

Permalink
packer: add workflow to automatically update orka images (#3621)
Browse files Browse the repository at this point in the history
  • Loading branch information
gdams authored Jun 25, 2024
1 parent 8d0becc commit 768a5af
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/packer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Packer

on:
workflow_dispatch:
push:
paths:
- .github/workflows/packer.yml
- ansible/playbooks/AdoptOpenJDK_Unix_Playbook/**
- ansible/packer/**
branches:
- master

jobs:
packer:
name: Update macOS Orka Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

# This is to fix an issue with the github macos14 runner, that cant resolve keyserver.ubuntu.com
# but this does work when replaced with the IP address. Spotted during the GPG verification of ANT step
# Upstream Bug : https://github.com/actions/runner-images/issues/9777
- name: Replace keyserver address with IP address
run: |
sed -i '' 's/keyserver\.ubuntu\.com/185.125.188.27/g' ansible/playbooks/Supporting_Scripts/package_signature_verification.sh
- 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: Init Packer
run: packer init orka.pkr.hcl
working-directory: ansible/packer

- name: Run Packer
run: packer build orka.pkr.hcl
working-directory: ansible/packer
env:
ORKA_TOKEN: ${{ secrets.ORKA_TOKEN }}

0 comments on commit 768a5af

Please sign in to comment.