Skip to content

Commit ffc0b36

Browse files
committed
Move repo vars into env vars
1 parent 226a82f commit ffc0b36

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

.github/workflows/export.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ defaults:
2020
run:
2121
shell: bash
2222

23+
env:
24+
CONAN_REMOTE_NAME: xrplf
25+
CONAN_REMOTE_URL: https://conan.ripplex.io
26+
2327
jobs:
2428
export:
2529
runs-on: ubuntu-latest
@@ -28,16 +32,6 @@ jobs:
2832
uses: actions/checkout@v4
2933
- name: Install Conan
3034
uses: conan-io/setup-conan@v1
31-
- name: Add Conan remote
32-
if: ${{ github.repository_owner == 'XRPLF' && github.event_name == 'push' }}
33-
run: |
34-
conan remote add --index 0 ${{ vars.CONAN_REMOTE_NAME }} ${{ vars.CONAN_REMOTE_URL }}
35-
echo "Added new conan remote '${{ vars.CONAN_REMOTE_NAME }}' at ${{ vars.CONAN_REMOTE_URL }}."
36-
- name: Log into Conan remote
37-
if: ${{ github.repository_owner == 'XRPLF' && github.event_name == 'push' }}
38-
run: |
39-
conan remote login ${{ vars.CONAN_REMOTE_NAME }} ${{ secrets.CONAN_REMOTE_USERNAME }} --password "${{ secrets.CONAN_REMOTE_PASSWORD }}"
40-
conan remote list-users
4135
- name: Export the recipes
4236
working-directory: recipes
4337
run: |
@@ -46,8 +40,19 @@ jobs:
4640
conan export snappy/all --version=1.1.10
4741
conan export soci/all --version=4.0.3
4842
conan export wasm-xrplf/all --version=2.4.1-xrplf
43+
- name: Add Conan remote
44+
if: ${{ github.repository_owner == 'XRPLF' }}
45+
run: |
46+
conan remote add --index 0 ${{ env.CONAN_REMOTE_NAME }} ${{ env.CONAN_REMOTE_URL }}
47+
echo "Added new conan remote '${{ env.CONAN_REMOTE_NAME }}' at ${{ env.CONAN_REMOTE_URL }}."
4948
- name: Upload the recipes (dry run)
50-
run: conan upload '*' --confirm --check --only-recipe --remote ${{ vars.CONAN_REMOTE_NAME }} --dry-run
49+
if: ${{ github.repository_owner == 'XRPLF' }}
50+
run: conan upload '*' --confirm --check --only-recipe --remote ${{ env.CONAN_REMOTE_NAME }} --dry-run
51+
- name: Log into Conan remote
52+
if: ${{ github.repository_owner == 'XRPLF' && github.event_name == 'push' }}
53+
run: |
54+
conan remote login ${{ env.CONAN_REMOTE_NAME }} ${{ secrets.CONAN_REMOTE_USERNAME }} --password "${{ secrets.CONAN_REMOTE_PASSWORD }}"
55+
conan remote list-users
5156
- name: Upload the recipes
5257
if: ${{ github.repository_owner == 'XRPLF' && github.event_name == 'push' }}
53-
run: conan upload '*' --confirm --check --only-recipe --remote ${{ vars.CONAN_REMOTE_NAME }}
58+
run: conan upload '*' --confirm --check --only-recipe --remote ${{ env.CONAN_REMOTE_NAME }}

0 commit comments

Comments
 (0)