Create New Server #1953
This file contains 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
name: Create New Server | |
on: | |
schedule: | |
- cron: "0 6,14,22 * * *" | |
push: | |
branches: | |
- main | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-region: ap-northeast-2 | |
role-to-assume: arn:aws:iam::362142771237:role/github-actions-role | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Run script | |
env: | |
LIGHTSAIL_PRIVATE_KEY_BASE64: ${{ secrets.LIGHTSAIL_PRIVATE_KEY_BASE64 }} | |
run: bash main.sh 2>&1 |