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

Introduce the Android Alpha track 🎉 #235

Merged
merged 24 commits into from
May 18, 2022
Merged

Introduce the Android Alpha track 🎉 #235

merged 24 commits into from
May 18, 2022

Conversation

nilsreichardt
Copy link
Member

@nilsreichardt nilsreichardt commented May 17, 2022

Description

This PR adds an Alpha track for Android, like we already have for web with https://alpha.web.sharezone.net. On every commit on the main, we build a new Android version. Because Firebase Distribution doesn't care about versioning, we don't need a complicated system for increasing the version number.

As release note we are using the last commit message.

Users can join the Alpha track via this link: https://appdistribution.firebase.dev/i/9c4942a1c01a5496. Just follow the introductions by Google. But I think we should also add our own docs later (How to join the alpha program, how to leave, etc.). Would be good to do #166 first.

We should first merge the following PR before merging this PR:

Closes #215

@github-actions
Copy link

github-actions bot commented May 17, 2022

Visit the preview URL for this PR (updated for commit 5244ffe):

https://sharezone-test--pr235-android-alpha-hhe8t4ln.web.app

(expires Wed, 25 May 2022 15:01:49 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

nilsreichardt added a commit that referenced this pull request May 17, 2022
## Description
This should fix #237. I ran a Codemagic build and this worked 👍 

This unblocks:
* #230
* #235
@github-actions github-actions bot added the ci/cd label May 17, 2022
@nilsreichardt nilsreichardt changed the title WIP: Introduce the Android Alpha track 🎉 Introduce the Android Alpha track 🎉 May 18, 2022
@nilsreichardt
Copy link
Member Author

@Jonas-Sander You can now review :)

.github/workflows/alpha.yml Outdated Show resolved Hide resolved
.github/workflows/alpha.yml Outdated Show resolved Hide resolved
Comment on lines 127 to 133
- name: Remove credentials
if: always()
run: |
rm app/sharezone-prod-key.json
rm app/android/key.properties
rm app/android/app/key.jks
Copy link
Collaborator

Choose a reason for hiding this comment

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

If it's not mentioned here than I wouldn't bother: https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions

But if you look here under "Register all secrets used within workflows" then we should maybe register these files as secrets?

Anyways if you leave this code then at least write via documentation that you're not fully sure yourself if that step is necessary. I personally don't think so.

Copy link
Member Author

Choose a reason for hiding this comment

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

For now, I just removed step. Just in case we should remove the files or mark them as secret, we need to do this in other workflows as well. Therefore, I would do this in a different PR.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hm, okay. Can you create an issue for marking them as secrets? (I'm currently on mobile) Just so that we don't forget:)

Copy link
Member Author

Choose a reason for hiding this comment

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

I opened #245 but I think the in the section "Register all secrets used within workflows" they are talking about something different. I understand that if we create a new secret within a workflow (like generating a JWT), you can mark this as secret so that this secret with not shown in the logs. But all the files that we created like sharzeone-prod-key.json, key.properties, etc. are just already registered secrets (just written in a file). So they should already be masked in the logs.

My concern was a different one. I was more thinking about that the company GitHub is compromised and someone got access to the GitHub Actions containers and is able to read all the files. Or we say that we don't trust GitHub that they really delete all files after finishing a workflow. I know that are rare cases but my idea was to just decrease the risk where we have the impact to do it (especially when it's so easy like here we just execute 3 commands).

Copy link
Member Author

Choose a reason for hiding this comment

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

I was more thinking about that the company GitHub is compromised and someone got access to the GitHub Actions containers and is able to read all the files. Or we say that we don't trust GitHub that they really delete all files after finishing a workflow. I know that are rare cases but my idea was to just decrease the risk where we have the impact to do it (especially when it's so easy like here we just execute 3 commands).

I thought a bit about that doesn't make sense (except you don't trust GitHub that they do not delete the VMs immediately)

Copy link
Collaborator

@Jonas-Sander Jonas-Sander left a comment

Choose a reason for hiding this comment

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

Please check again that nothing gets leaked in the logs and create the issue for marking the files as secrets (if the docs say it's necessary in our case).

Otherwise LGTM! 🎉

@nilsreichardt nilsreichardt merged commit 9d08733 into main May 18, 2022
@nilsreichardt nilsreichardt deleted the android-alpha branch May 18, 2022 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set up Alpha track for Android
2 participants