GithubHelp home page GithubHelp logo

kmmbridgegithubworkflow's Introduction

KMM Bridge Github Workflow

Github actions workflows for use with KMMBridge

kmmbridgegithubworkflow's People

Contributors

kpgalligan avatar mrf7 avatar russhwolf avatar samhill303 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kmmbridgegithubworkflow's Issues

Add ability to set custom netrc credentials

Right now, our docs on Artifactory recommend setting up a custom github action rather than using this one, because different netrc credentials are needed. This will also come up for other backends. We should add the ability to pass credentials manually so the workflows in this repo are usable in more non-github scenarios.

Kevin update:

Updated the workflow to take netrc params. the netrc params are optional. If none are provided, the workflow assumes the GitHub Packages config.

Params:

  • inputs.netrcMachine
  • secrets.netrcUsername
  • secrets.netrcPassword

Make sure to set workflow to v0.7.

Example:

name: KMM Bridge/iOS Publish
on:
  workflow_dispatch:
#  push:
#    branches:
#      - "main"
jobs:
  call-kmmbridge-publish:
    uses: touchlab/KMMBridgeGithubWorkflow/.github/workflows/[email protected]
    with:
      netrcMachine: maven.pkg.github.com # <- Put machine here
    secrets:
      netrcUsername: kpgalligan # <- username
      netrcPassword: ghp_ASRTASRTARSTARSTARST # <- password, PAT for GitHub
      PODSPEC_SSH_KEY: ${{ secrets.PODSPEC_SSH_KEY }}

This has been only been tried with the same server that will work by default, maven.pkg.github.com. It should be tested with other servers like Artifactory.

Also need to add docs for passing in workflow params, and maybe an integration workflow.

Passing environment variables to the workflow

I am not sure if this is a real issue or if I lack some GHA experience.
I have the following workflow

name: iOS Publish
on:
  pull_request:
  workflow_dispatch:

#  push:
#    branches:
#      - "main"

env:
  gitHubUserName: ${{ secrets.GH_USER_NAME }}
  gitHubAccessToken: ${{ secrets.GH_ACCESS_TOKEN }}

jobs:
  publishIOS:
    name: Publish iOS
    permissions:
      contents: write
      packages: write
    uses: touchlab/KMMBridgeGithubWorkflow/.github/workflows/[email protected]
    with:
      jvmVersion: 17
      runsOn: ubuntu-20.04
      versionBaseProperty: LIBRARY_VERSION

The KKMBridge workflow launches a gradle task under the hood that executes some code in my underlying gradle configuration in the Android project. This project needs some env variables set by the GHA. In that case gitHubUserName and gitHubUserName.
Unfortunately, when setting the env variables in this workflow it seems to be not propagated down to the KMMBridge workflow. gitHubUserName and gitHubUserName are always null when the underlying gradle tasks in the Android project are executed.

Who has an idea of a potential fix?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.