-
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
packer: add workflow to automatically update orka images (#3621)
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
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
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 }} |