Skip to content

ci: add workflow to deploy Firebase rules #419

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

Merged
merged 60 commits into from
Apr 10, 2025
Merged

Conversation

staceybeard
Copy link
Member

@staceybeard staceybeard commented Mar 25, 2025

By submitting this merge request, I confirm the following:

  • The merge request title follows the conventional commits convention (see Backend project's README.md)

Changes

Wrote a workflow to deploy Firebase rules via GitHub Actions. This is done automatically for dev, and can be run manually in any other available environment.

Also consolidated our Firebase rules files to only have one file for all environments.

Dependencies

  • App: N/A

@staceybeard
Copy link
Member Author

@mschoettle

For the pre-commit hooks, thanks for the reminder, I'll set those up 👍

I was able to run zizmor and address its findings, but actionlint fails for me with the following error:

did not run successfully while checking script at line:58,col:9: ...\pre-commit\repozpzbzmpq\golangenv-default\bin
\shellcheck.exe exited with status 1 but stdout was empty. stderr: "2025/04/07 14:13:58 environ invalid: empty key\n"

@mschoettle
Copy link
Member

@mschoettle

For the pre-commit hooks, thanks for the reminder, I'll set those up 👍

I was able to run zizmor and address its findings, but actionlint fails for me with the following error:

did not run successfully while checking script at line:58,col:9: ...\pre-commit\repozpzbzmpq\golangenv-default\bin
\shellcheck.exe exited with status 1 but stdout was empty. stderr: "2025/04/07 14:13:58 environ invalid: empty key\n"

What I suggest we do is:

  • let's add a pre-commit config to this repo
  • we add a CI job that runs pre-commit

This gives us additional checks in the pipeline. And we leave it optional to install the hooks locally.

@mschoettle
Copy link
Member

Run firebase deploy --only database

Error: Invalid project id: $VAR_PROJECT_ID.
Note: Project id must be all lowercase.
Error: Process completed with exit code 1.

Can you DM me the contents of the secret? In GitHub it is not possible to read secrets in the settings once they are set.

@staceybeard
Copy link
Member Author

@mschoettle The <ENV>_FIREBASE_PROJECT_ID values aren't secrets, they're on the variables tab, so you should be able to view them.

@staceybeard staceybeard requested a review from mschoettle April 10, 2025 18:49
@staceybeard staceybeard merged commit 610eba8 into main Apr 10, 2025
3 checks passed
@staceybeard staceybeard deleted the OP-93.SB.github-actions branch April 10, 2025 19:35
mschoettle pushed a commit that referenced this pull request Apr 15, 2025
Wrote a workflow to deploy Firebase rules via GitHub Actions. This is done automatically for dev, and can be run manually in any other available environment.

Also consolidated our Firebase rules files to only have one file for all environments.
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.

2 participants