Skip to content

Commit 7038ec6

Browse files
chore: add airgapper workflow file
1 parent f2fd8b2 commit 7038ec6

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Universal Airgapper
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
job-name:
7+
description: 'Job Name'
8+
default: 'airgapper'
9+
required: false
10+
image_registry:
11+
description: 'Registry of the image to use'
12+
default: 'ghcr.io'
13+
required: false
14+
image_name:
15+
description: 'Name of the image'
16+
default: 'fullstacks-gmbh/universal-airgapper'
17+
required: false
18+
image_tag:
19+
description: 'Tag of the image'
20+
default: '0.0.10'
21+
required: false
22+
image_pull_policy:
23+
description: 'Image pull policy'
24+
default: 'always'
25+
required: false
26+
config-folder:
27+
description: '--config-folder parameter; path to folder, containing config files'
28+
default: '${{ github.workspace }}'
29+
required: false
30+
credentials-file:
31+
description: '--credentials-file parameter; path to credentials file'
32+
default: '${{ secrets.UNIVERSAL_AIRGAPPER_CREDS }}'
33+
required: false
34+
debug:
35+
description: 'Enable debug mode'
36+
default: ''
37+
required: false
38+
39+
jobs:
40+
airgapper:
41+
name: ${{ github.event.inputs.job-name || 'airgapper' }}
42+
runs-on: ubuntu-latest
43+
container:
44+
image: ${{ github.event.inputs.image_registry || 'registry.lab.cloudstacks.eu' }}/${{ github.event.inputs.image_name || 'fullstacks-tools/universal-airgapper' }}:${{ github.event.inputs.image_tag || 'latest' }}
45+
options: --pull=${{ github.event.inputs.image_pull_policy || 'always' }}
46+
steps:
47+
- name: Checkout repository
48+
uses: actions/checkout@v4
49+
50+
- name: Show config files
51+
run: |
52+
echo "========================================================"
53+
echo "================ Universal Airgapper [ $APP_VERSION ] ============"
54+
echo "================ Commit - $APP_COMMIT_SHA ==================="
55+
echo "====================== CONFIG =========================="
56+
cat ${{ github.event.inputs.config-folder || github.workspace }}/*.yaml || true
57+
echo "========================================================"
58+
59+
- name: Run Universal Airgapper
60+
run: |
61+
python /home/airgapper/main.py \
62+
--credentials-file "${{ github.event.inputs.credentials-file || secrets.UNIVERSAL_AIRGAPPER_CREDS }}" \
63+
--config-folder "${{ github.event.inputs.config-folder || github.workspace }}" ${{ github.event.inputs.debug }}

0 commit comments

Comments
 (0)