Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the usage of this image as a GitHub Action #45

Closed
vincentbrison opened this issue May 3, 2020 · 8 comments · Fixed by #52
Closed

Allow the usage of this image as a GitHub Action #45

vincentbrison opened this issue May 3, 2020 · 8 comments · Fixed by #52
Labels
enhancement New feature or request
Milestone

Comments

@vincentbrison
Copy link
Contributor

vincentbrison commented May 3, 2020

As the GitHub Action shown in the README.md, we could add the ability to use this image as a GitHub action, letting the consumer of the action defining what he wants to do instead of fastlane call in our example.

Using GitHub Action args, we could enable/disable caching, and specifying docker image tag.

@vincentbrison vincentbrison added the enhancement New feature or request label May 3, 2020
@vincentbrison vincentbrison added this to the v2 milestone May 3, 2020
@vincentbrison
Copy link
Contributor Author

What do you think about that @sjcqs ?

@sjcqs
Copy link
Contributor

sjcqs commented May 3, 2020

Great idea 👍

I can take a look

@sjcqs
Copy link
Contributor

sjcqs commented May 3, 2020

What need to be done:

  1. Define how we want the user to interact with the Github Action (shell input ? shell file input ? fastlane lane support ? )
  2. Add an action.yml which define the interface with the Github Action
  3. Add an entrypoint to the dockerfile which will execute the user action

References:

@vincentbrison
Copy link
Contributor Author

Imho, we should focus for now to add shell input support, as action consumer can just throw some fastlane or gradle command to test what can be done with the action. Furthermore, as actions are already yml code versioned with the project, the need of shell input file might just be an option.

About fastlane support, we dont need to do anything special as we would keep the following bloc in the action. So if the action consumer has a proper fastlane setup with proper Gemfile, Gemfile.lock and .ruby-version it would work out of the box.

    - name: Bundle install
      run: |
        bundle config path vendor/bundle
        bundle check || bundle install

@vincentbrison
Copy link
Contributor Author

Well well, we can not use action inside an action. So no caching out of the box for now. Maybe we should at least include a default fastlane install (as we provide a default bundler install)?

@vincentbrison
Copy link
Contributor Author

And to be able to run arbitrary docker-android image, we might need to use https://hub.docker.com/_/docker as host action image.

@vincentbrison
Copy link
Contributor Author

I added branch https://github.com/faberNovel/docker-android/tree/feature/action to show an example on how to run docker in docker as mentioned in #45 (comment)

@vincentbrison
Copy link
Contributor Author

Almost done, just need to pass command line args from action args to the docker image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants