Created
December 11, 2021 08:02
-
-
Save FATESAIKOU/42e3d6833d0ea37f4208e94786972dc8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| deploy-to-aws: | |
| needs: test-crawler-before-deploy-to-aws | |
| name: deploy-to-aws | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: Set PEM & SQL | |
| run: |- | |
| echo "$PEM" > section_18/crawler/proxy.pem | |
| echo "$SQL" > section_18/crawler/init.sql | |
| env: | |
| PEM: ${{ secrets.PROXY_PEM }} | |
| SQL: ${{ secrets.DB_SQL }} | |
| - name: Install mysql client | |
| run: sudo apt-get update && sudo apt-get install -y mysql-client-8.0 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v1 | |
| - name: Set up for Amazon ECR | |
| uses: aws-actions/configure-aws-credentials@v1 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ap-northeast-1 | |
| - name: Login to Amazon ECR | |
| uses: aws-actions/amazon-ecr-login@v1 | |
| - name: Login to Terraform cloud | |
| uses: hashicorp/setup-terraform@v1 | |
| with: | |
| cli_config_credentials_hostname: "app.terraform.io" | |
| cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment