[IT-3456] Test Windows OS upgrade #115
Workflow file for this run
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: aws-deploy | |
on: | |
push: | |
branches: [ '*' ] | |
tags: [ 'v[0-9]+\.[0-9]+\.[0-9]+' ] | |
pull_request: | |
branches: [ '*' ] | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- uses: pre-commit/[email protected] | |
deploy: | |
name: Upload to Amazon S3 | |
runs-on: ubuntu-latest | |
if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') }} | |
needs: [ "validate" ] | |
permissions: | |
id-token: write | |
contents: read | |
env: | |
# bucket in org-sagebase-admincentral | |
S3_BUCKET_URL: "s3://bootstrap-awss3cloudformationbucket-19qromfd235z9/${{ github.event.repository.name }}/${{ github.ref_name }}" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Assume AWS Role | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-region: us-east-1 | |
role-to-assume: arn:aws:iam::745159704268:role/sagebase-github-oidc-cfn-template-deploy | |
role-session-name: GhActions-${{ github.repository_owner }}-${{ github.event.repository.name }}-${{ github.run_id }} | |
role-duration-seconds: 900 | |
- name: Copy files with the AWS CLI | |
run: | | |
aws s3 rm --recursive $S3_BUCKET_URL | |
aws s3 cp --recursive templates $S3_BUCKET_URL |