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

[#226] Update to manage secrets with Github Environments for Staging and Production #263

Merged
merged 3 commits into from
Aug 25, 2023

Conversation

luongvo
Copy link
Member

@luongvo luongvo commented Aug 3, 2023

What happened 👀

  • Remove unnecessary token when checking out in bump_version workflow.
  • Fix: exporting multi-lines env files using quote "".
  • Convert some secrets to variables.
  • Move some secrets to the Environments config.

Insight 📝

  • To echo a multi-line variable in GitHub Actions, use quote "" https://stackoverflow.com/a/22101842/2100084
  • ENV_PRODUCTION and ENV_STAGING have been moved to the Environments
  • FIREBASE_ANDROID_APP_ID_PRODUCTION, FIREBASE_ANDROID_APP_ID_STAGING, FIREBASE_IOS_APP_ID_PRODUCTION, and FIREBASE_IOS_APP_ID_STAGING have been converted to variables and moved to the Environments
  • ANDROID_SIGNING_PROPERTIES_BASE64 is now become ANDROID_SIGNING_PROPERTIES without base64 encoded by using a multi-line variable

Proof Of Work 📹

@luongvo luongvo added this to the 1.11.0 milestone Aug 3, 2023
@luongvo luongvo self-assigned this Aug 3, 2023
@luongvo luongvo force-pushed the chore/226-update-secrets-management branch 4 times, most recently from fe4e85d to 9ecccf7 Compare August 3, 2023 11:08
@luongvo luongvo force-pushed the chore/226-update-secrets-management branch from 9ecccf7 to 15f03a5 Compare August 3, 2023 11:10
@luongvo luongvo temporarily deployed to production August 3, 2023 11:10 — with GitHub Actions Inactive
@luongvo luongvo temporarily deployed to production August 3, 2023 11:10 — with GitHub Actions Inactive
@luongvo luongvo temporarily deployed to staging August 3, 2023 11:10 — with GitHub Actions Inactive
@luongvo luongvo requested a review from doannimble August 10, 2023 02:29
Copy link
Contributor

@doannimble doannimble left a comment

Choose a reason for hiding this comment

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

We may need to check and update writing multiple lines later. Look good so far 👍

@luongvo
Copy link
Member Author

luongvo commented Aug 17, 2023

We may need to check and update writing multiple lines later. Look good so far 👍

@doannimble It has been verified to work properly with this .env structure https://github.com/nimblehq/flutter-templates/blob/develop/sample/.env.sample

image

@doannimble
Copy link
Contributor

We may need to check and update writing multiple lines later. Look good so far 👍

@doannimble It has been verified to work properly with this .env structure https://github.com/nimblehq/flutter-templates/blob/develop/sample/.env.sample

image

Nice @luongvo . Actually, it can write and read, but it may be incorrect. Have you tried to print out SECRET and REST_API_ENDPOINT (on app) to check (with the build made by github action)?.

@luongvo
Copy link
Member Author

luongvo commented Aug 17, 2023

@doannimble Yes, the last build can not run to show the staging name with a black screen

Text(
FlutterConfig.get('SECRET'),
style: const TextStyle(
color: AppColors.nimblePrimaryBlue,
fontSize: 24,
),
),

image

@luongvo luongvo merged commit 17471b3 into develop Aug 25, 2023
@luongvo luongvo deleted the chore/226-update-secrets-management branch August 25, 2023 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to manage secrets with Github Environments for Staging and Production
3 participants