Skip to content

Consider support for Forgejo #374

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

Open
mikebell opened this issue Mar 10, 2025 · 1 comment
Open

Consider support for Forgejo #374

mikebell opened this issue Mar 10, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@mikebell
Copy link

Suggestion

Background

Currently the apply and plan actions work really well in frogejo but the issue comment python code is github specific which fails (as expected)

Would it be possible to detect if it's being run in forgejo and have seperate logic to push a comment to forgejo?

This is not critical just a nice to have as the actions themselves still work there's just no user feedback.

@mikebell mikebell added the enhancement New feature or request label Mar 10, 2025
@mikebell
Copy link
Author

mikebell commented Apr 1, 2025

If anyone is interested in how I'm doing it at the moment:

plan.yaml

- name: terraform plan
        uses: https://github.com/dflook/terraform-plan@v1
        with:
          path: terraform
          add_github_comment: false

Note add_github_comment: false this is so it doesn't fail when it tries to add a comment to the PR. The plan is still available in the action history.

apply.yaml

- name: terraform apply
        uses: https://github.com/dflook/terraform-apply@v1
        with:
          path: terraform
          auto_approve: true

Note auto_approve: true this is because the plan action doesn't pass through the plan output so you have to run it again. I wouldn't run this is production though as you can't 100% guarantee what you see in the plan action is what you get in the apply (it's 99% though).


I wonder if a flag like add_forgejo_comment would be help to seperate the logic between github/forgejo api?

With the plan not passing through between plan and apply actions I've not had enough time to dig into how it's working.

This is enough to make me confident enough to move all my TF from Github to my own ForgeJo instance.

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

No branches or pull requests

1 participant