Skip to content
This repository was archived by the owner on Mar 15, 2026. It is now read-only.

initial commit#1

Merged
QuiiBz merged 1 commit intolagonapp:mainfrom
20k-ultra:init
Mar 29, 2023
Merged

initial commit#1
QuiiBz merged 1 commit intolagonapp:mainfrom
20k-ultra:init

Conversation

@20k-ultra
Copy link
Contributor

@20k-ultra 20k-ultra commented Mar 10, 2023

This is pretty complete and I expect to actually work. I just don't have local instance setup to confirm but it's pretty trivial what's going on..

The developing section needs 1 more piece to actually pass a folder containing a function.

good to merge if someone can confirm via running the test.sh with valid api tokens since I don't have local Lagon instance setup yet.

@20k-ultra 20k-ultra marked this pull request as draft March 10, 2023 18:46
@20k-ultra
Copy link
Contributor Author

20k-ultra commented Mar 10, 2023

I'll make this PR not a draft once I get development script to pass a folder to the workflow running so you can actually test locally with a function. done

@changeset-bot
Copy link

changeset-bot bot commented Mar 14, 2023

⚠️ No Changeset found

Latest commit: 9ec5710

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@20k-ultra 20k-ultra force-pushed the init branch 11 times, most recently from c79c8f9 to d9c961f Compare March 14, 2023 03:51
@20k-ultra
Copy link
Contributor Author

20k-ultra commented Mar 14, 2023

this test runner was removed

PR now contains ways to specify the command, function source, and site_url if you need to test the action with your self hosted instance of Lagon

./test.sh -r lagonapp/github-action@my-dev-branch \
  -f ~/Projects/lagon-function \
  -c "ls" \
  -s "https://lagon.mysite.io"

at a minimum you just need to pass a function

./test.sh -f ~/Projects/lagon-function

@20k-ultra 20k-ultra marked this pull request as ready for review March 14, 2023 03:53
@20k-ultra 20k-ultra force-pushed the init branch 3 times, most recently from d6b0b6d to 8586752 Compare March 14, 2023 03:59
Copy link
Member

@QuiiBz QuiiBz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your help on this!

@20k-ultra 20k-ultra force-pushed the init branch 9 times, most recently from 9af4473 to 70ff752 Compare March 24, 2023 04:14
@20k-ultra 20k-ultra force-pushed the init branch 15 times, most recently from 9f6fdfd to 7744eea Compare March 25, 2023 20:24
@20k-ultra 20k-ultra marked this pull request as draft March 25, 2023 20:24
@20k-ultra 20k-ultra force-pushed the init branch 8 times, most recently from 97a07b0 to bb4a028 Compare March 25, 2023 21:26
@20k-ultra
Copy link
Contributor Author

Ok, action should be merge-able now. Lots of real testing. I have added support for passing in a config object which will override the functions existing one or useful if you never committed one.

Also, another important part I almost forgot. This action allows you to run any CLI command right ? Well that is so you can than perform other steps like maybe send an email of a preview link to your function in a slack channel or something. I have achieved this by saving the CLI output to a local file called lagon.output.

here is an example of the action being used in a workflow to deploy a function than log the preview. You can see the workflow for this here.

here is an example of what the action does if the CLI errors. I encountered lagonapp/lagon#696 which made the action really difficult to exit correctly but I found a decent enough workaround but it's very brittle....

@20k-ultra
Copy link
Contributor Author

lagonapp/lagon#697 was just posted. I'll get the action working with that once it's merged.

Signed-off-by: 20k-ultra <3946250+20k-ultra@users.noreply.github.com>
@20k-ultra
Copy link
Contributor Author

20k-ultra commented Mar 29, 2023

good to go @QuiiBz! I've done a good amount of manual testing (actually running the action and making sure it errors when I wanted it to). I'm confident we can merge this and add more features as people want but the way it's built, it will be flexible enough to do anything you can normally do with local cli installation.

image

Photo of the action using the example from the readme but I have another step that reads the lagon.output file which the action creates for other steps to process.

Copy link
Member

@QuiiBz QuiiBz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for this work!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants