-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
56 lines (51 loc) · 1.67 KB
/
action.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
46
47
48
49
50
51
52
53
54
55
56
---
name: 'SOUP'
description: 'Execute soup'
inputs:
ssh-key:
description: 'ssh key'
required: true
github-token:
description: 'github token'
required: false
default: ${{ github.token }}
parameters:
description: 'soup parameters'
required: false
default: '--no_prompt'
runs:
using: "composite"
steps:
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v4
with:
ssh-key: ${{ inputs.ssh-key }}
persist-credentials: true
lfs: true
submodules: recursive
token: ${{ inputs.github-token }}
- shell: bash
id: soup
run: |
latest_tag="$(curl --silent --header "Authorization: Bearer ${{ inputs.github-token }}" https://api.github.com/repos/Cloud-Officer/soup/tags | jq -r '.[0].name')"
echo "Latest soup tag: ${latest_tag}"
asset_url=""https://github.com/Cloud-Officer/soup/archive/refs/tags/${latest_tag}.zip""
curl -L "${asset_url}" -o "${RUNNER_TEMP}/soup.zip"
unzip -q "${RUNNER_TEMP}/soup.zip" -d "${RUNNER_TEMP}"
rm -rf "${RUNNER_TEMP}/soup.zip"
echo "soup_location=${RUNNER_TEMP}/soup-${latest_tag}" >> ${GITHUB_ENV}
# https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
- uses: ruby/setup-ruby@master
with:
ruby-version: 3.3.2
bundler: 'none'
# https://github.com/Cloud-Officer/soup
- shell: bash
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
run: |
pushd "${{env.soup_location}}"
bundle config unset deployment
bundle install
popd
"${{env.soup_location}}/bin/soup.rb" ${{ inputs.parameters }}