-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (41 loc) · 1.14 KB
/
manual-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Manually build both images and test
on:
workflow_dispatch:
inputs:
tag:
type: string
required: true
platform:
type: choice
options:
- AWS
- DigitalOcean
- Both
jobs:
detect-source:
runs-on: ubuntu-latest
outputs:
source: ${{ steps._id.outputs.source }}
steps:
- id: _id
shell: bash
run: |
source=
case "${{ inputs.platform }}" in
"AWS") source="amazon-ebs.aws-ami" ;;
"DigitalOcean") source="digitalocean.do-marketplace" ;;
"Both") source="amazon-ebs.aws-ami,digitalocean.do-marketplace" ;;
esac
echo "source: $source"
echo "source=$source" >> $GITHUB_OUTPUT
do:
uses: ./.github/workflows/build_images.yml
needs: [ detect-source ]
with:
tag: ${{ inputs.tag }}
source: ${{ needs.detect-source.outputs.source }}
secrets:
github-token: ${{ secrets.GH_TOKEN_PERSONAL }}
digitalocean-token: ${{ secrets.DO_TOKEN }}
aws-secret-key: ${{secrets.AWS_SECRET_KEY }}
aws-key-id: ${{secrets.AWS_KEY_ID}}