diff --git a/.github/actions/apply/terraform/action.yml b/.github/actions/apply/terraform/action.yml index 308b0455..58faa602 100644 --- a/.github/actions/apply/terraform/action.yml +++ b/.github/actions/apply/terraform/action.yml @@ -1,5 +1,19 @@ name: Apply Terraform +inputs: + aws_access_key_id: + description: "AWS Access Key ID" + required: true + aws_secret_access_key: + description: "AWS Secret Access Key" + required: true + db_username: + description: "Database Username" + required: true + db_password: + description: "Database Password" + required: true + runs: using: 'composite' steps: @@ -18,7 +32,7 @@ runs: working-directory: ./infra shell: bash env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - TF_VAR_db_username: ${{ secrets.TF_VAR_DB_USERNAME }} - TF_VAR_db_password: ${{ secrets.TF_VAR_DB_PASSWORD }} + AWS_ACCESS_KEY_ID: ${{ inputs.aws_access_key_id }} + AWS_SECRET_ACCESS_KEY: ${{ inputs.aws_secret_access_key }} + TF_VAR_db_username: ${{ inputs.db_username }} + TF_VAR_db_password: ${{ inputs.db_password }} diff --git a/.github/workflows/deployment.yml b/.github/workflows/deploy.yml similarity index 61% rename from .github/workflows/deployment.yml rename to .github/workflows/deploy.yml index b5e43ddc..ea1534c4 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deploy.yml @@ -14,6 +14,11 @@ jobs: - name: Apply Terraform uses: ./.github/actions/apply/terraform + with: + aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + db_username: ${{ secrets.TF_VAR_DB_USERNAME }} + db_password: ${{ secrets.TF_VAR_DB_PASSWORD }} - name: Migrate database uses: ./.github/actions/migrate/database diff --git a/.github/workflows/validation.yml b/.github/workflows/validate.yml similarity index 100% rename from .github/workflows/validation.yml rename to .github/workflows/validate.yml