Skip to content

Commit a3e9394

Browse files
committed
.github/workflows/deploy.yml: fix secrets handling
Change-Id: I9c5d3cdb33a0b5dd18c353e9769bb8f0d5d9e1eb Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
1 parent 3bb71b1 commit a3e9394

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

.github/workflows/deploy-template.yml

+2-8
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ on:
1616
type:
1717
type: string
1818
required: false
19-
CLOUD_URL:
20-
type: string
21-
required: false
22-
CLOUD_PASSWORD:
23-
type: string
24-
required: false
2519

2620
jobs:
2721
deploy:
@@ -87,11 +81,11 @@ jobs:
8781
- name: Upload to Nextcloud
8882
run: |
8983
BASE_URL="https://cloud.3mdeb.com/public.php/webdav"
90-
url_part=$(echo "${{ inputs.CLOUD_URL }}" | cut -d'/' -f6)
84+
url_part=$(echo "${{ secrets.CLOUD_URL }}" | cut -d'/' -f6)
9185
base_dir="${{ steps.parse_directories.outputs.base_dir }}"
9286
model="${{ steps.parse_directories.outputs.model }}"
9387
release="${{ steps.parse_directories.outputs.release }}"
94-
CURL_CMD="curl -u $url_part:${{ inputs.CLOUD_PASSWORD }}"
88+
CURL_CMD="curl -u $url_part:${{ secrets.CLOUD_PASSWORD }}"
9589
9690
if [ "${{ inputs.platform }}" == "protectli" ]; then
9791
new_name=$(echo "${{ inputs.vendor }}-${{ inputs.model }}.rom" | sed 's/-/_/g; s/.*/\L&/')

.github/workflows/deploy.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ jobs:
1212
platform: protectli
1313
vendor: ${{ matrix.vendor }}
1414
model: ${{ matrix.model }}
15-
CLOUD_URL: ${{ secrets.CLOUD_URL }}
16-
CLOUD_PASSWORD: ${{ secrets.CLOUD_PASSWORD }}
15+
secrets: inherit
1716
strategy:
1817
matrix:
1918
vendor: [ protectli ]
@@ -24,8 +23,7 @@ jobs:
2423
uses: ./.github/workflows/deploy-template.yml
2524
with:
2625
platform: novacustom
27-
CLOUD_URL: ${{ secrets.CLOUD_URL }}
28-
CLOUD_PASSWORD: ${{ secrets.CLOUD_PASSWORD }}
26+
secrets: inherit
2927

3028
deploy_pcengines:
3129
if: contains(github.ref, 'refs/tags/pcengines')
@@ -35,8 +33,7 @@ jobs:
3533
vendor: ${{ matrix.vendor }}
3634
model: ${{ matrix.model }}
3735
payload: ${{ matrix.payload }}
38-
CLOUD_URL: ${{ secrets.CLOUD_URL }}
39-
CLOUD_PASSWORD: ${{ secrets.CLOUD_PASSWORD }}
36+
secrets: inherit
4037
strategy:
4138
matrix:
4239
vendor: [ pcengines ]
@@ -49,8 +46,7 @@ jobs:
4946
with:
5047
platform: msi
5148
type: ${{ matrix.type }}
52-
CLOUD_URL: ${{ secrets.CLOUD_URL }}
53-
CLOUD_PASSWORD: ${{ secrets.CLOUD_PASSWORD }}
49+
secrets: inherit
5450
strategy:
5551
matrix:
5652
type: [ ddr4, ddr5 ]

0 commit comments

Comments
 (0)