Hey, I am trying to use the `kmmbridge` in the exi...
# touchlab-tools
p
Hey, I am trying to use the
kmmbridge
in the existing big project to publish shared for iOS. I have an issue with github actions configuration as my project is setting up some local.properties. I am trying to add these steps in publish workflow, but github actions for some reason do not allow to use predefined action (touchlab/KMMBridgeGithubWorkflow/.github/workflows/faktorybuildbranches.yml@v0.9) as one of the steps. How can I do that? Workflow file in thread đź§µ
Copy code
name: KMM Bridge Publish Release
on:
  workflow_dispatch:

jobs:
  call-kmmbridge-publish:
    runs-on: macos-latest
    steps:
      - name: Checkout the code
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: set up JDK 17
        uses: actions/setup-java@v3
        with:
          distribution: 'zulu'
          java-version: 17
      - name: Access TILT_BASE_URL_DEV
        env:
          TILT_BASE_URL_DEV: ${{ secrets.TILT_BASE_URL_DEV }}
        run: echo TILT_BASE_URL_DEV=$TILT_BASE_URL_DEV >> ./local.properties
        permissions:
          contents: write
          packages: write
      - name: Build and publish KMP
        uses: touchlab/KMMBridgeGithubWorkflow/.github/workflows/faktorybuildbranches.yml@v0.9
        with:
          jvmVersion: 17
r
I haven't configured something like this, but you might be able to do it by chaining multiple workflows together via the workflow_run trigger. Alternatively, you could copy the relevant actions out of our workflow file. The important part is calling the gradle task and wiring in the relevant arguments/secrets to it.
p
Thanks. I ended up with copying some parts from kmmpublish workflow. I think the problem in this workflow is the
checkout
action that cleans the properties? Or other action maybe is cleaning the
local.properties
.
k
Your problem is with GH actions:
Copy code
TILT_BASE_URL_DEV: ${{ secrets.TILT_BASE_URL_DEV }}
        run: echo TILT_BASE_URL_DEV=$TILT_BASE_URL_DEV >>
your secrets are obfuscated, so you basically append “*” to gradle.properties
if the
TILT_BASE_URL_DEV
is not a real secret, you can move it to Project Variables, which is not obfuscated by GH actions
p
I put here only one of these, most of the fields in
local.properties
are apiKeys and this GH actions works for the project. Now, when I moved the checkout up and use specific actions instead of the predefined workflow, everythink works
👍 1