Change job name from build to export to match updated PR #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Export | |
| on: | |
| push: | |
| paths: | |
| - '.github/workflows/export.yml' | |
| - 'recipes/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| # Note that `conan user` implicitly uses the environment variables | |
| # `CONAN_LOGIN_USERNAME_<REMOTE>` and `CONAN_PASSWORD_<REMOTE>`, see also | |
| # https://docs.conan.io/2/reference/environment.html#remote-login-variables. | |
| CONAN_REMOTE_URL: https://conan.ripplex.io | |
| CONAN_REMOTE_NAME: xrplf | |
| CONAN_LOGIN_USERNAME_XRPLF: ${{ secrets.CONAN_USERNAME }} | |
| CONAN_PASSWORD_XRPLF: ${{ secrets.CONAN_PASSWORD }} | |
| jobs: | |
| export: | |
| runs-on: ubuntu-latest | |
| container: ghcr.io/xrplf/ci/debian-bookworm:gcc-12 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Add Conan remote | |
| run: | | |
| conan remote list | |
| if conan remote list | grep -q '${{ env.CONAN_REMOTE_NAME }}'; then | |
| conan remote remove ${{ env.CONAN_REMOTE_NAME }} | |
| echo "Removed existing conan remote '${{ env.CONAN_REMOTE_NAME }}'." | |
| fi | |
| conan remote add --index 0 ${{ env.CONAN_REMOTE_NAME }} ${{ env.CONAN_REMOTE_URL }} | |
| echo "Added new conan remote '${{ env.CONAN_REMOTE_NAME }}' at ${{ env.CONAN_REMOTE_URL }}." | |
| - name: Verify Conan remote | |
| run: | | |
| conan remote auth ${{ env.CONAN_REMOTE_NAME }} --force | |
| conan remote list-users | |
| - name: Export the recipes | |
| working-directory: recipes | |
| run: | | |
| # Loop over all recipes listed in the exports directory. | |
| for export in ../exports/*.json; do | |
| # Extract the recipe name, version, and directory. | |
| name=$(jq -r '.name' ${export}) | |
| dir=$(jq -r '.dir' ${export}) | |
| version=$(jq -r '.version' ${export}) | |
| # Export the recipe. | |
| conan export "${name}/${dir}" \ | |
| --version="${version}" \ | |
| --remote ${{ env.CONAN_REMOTE_NAME }} | |
| done |