-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
56 lines (47 loc) · 1.63 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: "Poetry update"
description: "Poetry dependencies update"
inputs:
dry_run:
description: Dry run action, no pull request is created
default: 'false'
required: false
working_directory:
description: Working directory, defaults to GITHUB_WORKSPACE
required: false
default: ${{ github.workspace }}
ssh_key:
description: "SSH key to use for private repositories"
required: false
runs:
using: "composite"
steps:
- name: Setup Python + Poetry for action
uses: moneymeets/action-setup-python-poetry@master
with:
working_directory: ${{ github.action_path }}
with_checks: 'false'
poetry_cache_enabled: 'false'
- id: action-virtual-env-path
shell: bash
working-directory: ${{ github.action_path }}
run: |
VIRTUAL_ENV_PATH=$(poetry run poetry env info --path)
echo $VIRTUAL_ENV_PATH
echo "venv-path=$VIRTUAL_ENV_PATH" >> $GITHUB_OUTPUT
- name: Setup Python + Poetry for workspace
uses: moneymeets/action-setup-python-poetry@master
with:
working_directory: ${{ inputs.working_directory }}
with_checks: 'false'
poetry_cache_enabled: 'false'
ssh_key: ${{ inputs.ssh_key }}
- name: Update dependencies
shell: bash
working-directory: ${{ github.working_directory }}
run: |
if [ ! -z "${{ inputs.ssh_key }}" ]; then
eval "$(ssh-agent -s)"
ssh-add - <<< "${{ inputs.ssh_key }}"
fi
${{ steps.action-virtual-env-path.outputs.venv-path }}/bin/actions_helper dependency-update \
--dry-run ${{ inputs.dry_run }}