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

GitHub Action + tag suffix + build options #13

Closed

Conversation

ysbaddaden
Copy link
Contributor

Fixes #7 by adding the necessary action.yml metadata to run build script directly, and the necessary action.sh shell script to transform the action inputs into environment variables, .

Also provides two new options, one to pass a tag suffix, for example -next to have image tags such as :1.2.3-next or :dev-next, and another one to pass options to the docker build command, for example --build gemfile=Gemfile.next. Those options allows to build 2 variants of CDx for example, the current one with Rails 4.2 and the next one with Rails 5.0.

@ysbaddaden
Copy link
Contributor Author

Sigh, the composite action doesn't work: it runs the action.sh from the app, not the one provided by the action 😞

@ysbaddaden ysbaddaden force-pushed the feature/actual-github-action branch 2 times, most recently from 8121748 to 6c3980c Compare March 31, 2022 13:57
The composite action didn't work as expected (the action's
`action.sh` and `build.sh` weren't accessible), so I replaced the
shell script with a tiny JavaScript bootstrap, that will properly
collect the action inputs and generate a simple local build.sh and
calls it.

Note that we couldn't use a Docker container action, because we
couldn't access the host docker ending, and would need to add both
docker cli and docker server to the docker container...
@ysbaddaden
Copy link
Contributor Author

It's finally working. You can see a test run here for example:
https://github.com/instedd/cdx/runs/5773491195?check_suite_focus=true

Is it worth spending more time writing GitHub Actions? No. A single repository with a bunch of Bash or Ruby scripts would be much better.

@ysbaddaden
Copy link
Contributor Author

ping @matiasgarciaisaia

@matiasgarciaisaia
Copy link
Member

Do you mind adding some tests for the new flags? I can give them a try, otherwise.

@matiasgarciaisaia matiasgarciaisaia deleted the branch manastech:master January 25, 2023 19:35
@matiasgarciaisaia
Copy link
Member

Sorry @ysbaddaden - I've deleted the master branch (to rename it to main) and the PR got auto-closed.

@ysbaddaden
Copy link
Contributor Author

@matiasgarciaisaia I used the opportunity to rebase from main and add the missing tests for the -t and -o arguments in #16!

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

Successfully merging this pull request may close these issues.

Provide a Github Action
2 participants