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

Pull environmnet on Github workflow #12273

Closed
afern247 opened this issue Mar 21, 2023 · 3 comments
Closed

Pull environmnet on Github workflow #12273

afern247 opened this issue Mar 21, 2023 · 3 comments
Assignees
Labels
pending-response Issue is pending response from the issue author pending-triage Issue is pending triage platform Issues tied to the general CLI platform question General question

Comments

@afern247
Copy link

Amplify CLI Version

11.0.2

Question

I'd like to create a workflow on github actions to pull my environment so I can run the app and make sure it builds on, this is useful for pull requests, tests and publishing the app. Since there are multiple steps such as logging in on the web, how can do this?

Locally I would pull the environment and it would open a website to authenticate. Is there a way to do it all via CLI by providing let's say a token?

Thanks

@afern247 afern247 added pending-triage Issue is pending triage question General question labels Mar 21, 2023
@josefaidt
Copy link
Contributor

Hey @afern247 👋 thanks for raising this! Check out this Action for setting up AWS credentials https://github.com/aws-actions/configure-aws-credentials, this should allow you to run amplify pull --appId <app-id> --envName <env-name>/amplify init on your project in GitHub Actions.

Locally I would pull the environment and it would open a website to authenticate. Is there a way to do it all via CLI by providing let's say a token?

Despite whether you are using Amplify Studio or sessions via aws sso and IAM Identity Center, the amplify/.config/local-aws-info.json file (which determines how you authenticate locally) is gitignored. Meaning when you authenticate in GitHub Actions with the temporary credentials on environment variables you will not be redirected to the site for login.

Today, there are two active bugs which may cause an issue with this flow:

@josefaidt josefaidt self-assigned this Mar 21, 2023
@josefaidt josefaidt added pending-response Issue is pending response from the issue author platform Issues tied to the general CLI platform labels Mar 21, 2023
@josefaidt
Copy link
Contributor

Closing due to inactivity and in favor of tracking existing issues

@josefaidt josefaidt closed this as not planned Won't fix, can't repro, duplicate, stale Apr 13, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-response Issue is pending response from the issue author pending-triage Issue is pending triage platform Issues tied to the general CLI platform question General question
Projects
None yet
Development

No branches or pull requests

2 participants