This repository has been archived by the owner on Jun 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpatch
85 lines (73 loc) · 3.11 KB
/
patch
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
diff --git a/.github/workflows/release.yml b/../role-homeshick/.github/workflows/release.yml
index c01c176..1a59dc2 100644
--- a/.github/workflows/release.yml
+++ b/../role-homeshick/.github/workflows/release.yml
@@ -1,5 +1,5 @@
---
-name: role-homebrew-retry-publish-to-galaxy
+name: role-homeshick-publish-to-galaxy
# Workflow Secrets:
# SLACK_WEBHOOK (Required, for slack notifications...)
@@ -16,7 +16,7 @@ on:
default: ''
env:
- PROJECT_NAME: "role-homebrew-retry"
+ PROJECT_NAME: "role-homeshick"
USERNAME: "osx-provisioner"
jobs:
@@ -29,12 +29,12 @@ jobs:
python-version: [3.9]
steps:
-
- name: Publish to Galaxy -- Code Checkout (workflow dispatch)
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v3
with:
fetch-depth: 0
+ path: 'role'
ref: ${{ github.event.inputs.TAG }}
- name: Publish to Galaxy -- Code Checkout (published release)
@@ -42,16 +42,17 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
+ path: 'role'
- name: Publish to Galaxy -- Setup Environment
run: |
- source .github/scripts/setup.sh
+ source ./role/.github/scripts/setup.sh
env:
WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
- name: Publish to Galaxy -- Install Poetry
run: |
- source .github/scripts/poetry.sh
+ source ./role/.github/scripts/poetry.sh
- name: Publish to Galaxy -- Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
@@ -65,24 +66,26 @@ jobs:
- name: Publish to Galaxy -- Mount Poetry Cache
uses: actions/cache@v3
with:
- key: poetry-${{ hashFiles('pyproject.toml') }}-${{ runner.os }}-${{ env.CACHE_TTL }}
+ key: poetry-${{ hashFiles('./role/pyproject.toml') }}-${{ runner.os }}-${{ env.CACHE_TTL }}
path: ~/.cache/pypoetry/virtualenvs/
- name: Publish to Galaxy -- Install Requirements
run: |
+ cd role
poetry install
- name: Publish to Galaxy -- Trigger Ansible Galaxy Import
run: |
- poetry run ansible-galaxy role import ${USERNAME} ${PROJECT_NAME} --token ${API_KEY}
+ cd role
+ poetry run ansible-galaxy role import ${USERNAME} ${PROJECT_NAME} --token ${API_KEY}
env:
API_KEY: ${{ secrets.GALAXY_API_KEY }}
- name: Publish to Galaxy -- Report Job Status (Success)
run: |
- ./.github/scripts/notifications.sh "${NOTIFICATION}" ":white_check_mark: automated ansible galaxy import has been completed!"
+ ./role/.github/scripts/notifications.sh "${NOTIFICATION}" ":white_check_mark: automated ansible galaxy import has been completed!"
- name: Publish to Galaxy -- Report Job Status (Failure)
if: failure()
run: |
- ./.github/scripts/notifications.sh "${NOTIFICATION}" ":x: automated ansible galaxy import has failed!"
+ ./role/.github/scripts/notifications.sh "${NOTIFICATION}" ":x: automated ansible galaxy import has failed!"