feat(aws-regions): update refresh regions action (#1641)

Co-authored-by: sergargar <sergio@verica.io>
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
This commit is contained in:
Sergio Garcia
2023-01-03 12:59:08 +01:00
committed by GitHub
parent 567c150eaa
commit 0de6d87af5
2 changed files with 42 additions and 75 deletions

View File

@@ -2,12 +2,11 @@
name: Refresh regions of AWS services
on:
schedule:
- cron: "0 9 * * *" #runs at 09:00 UTC everyday
on: workflow_dispatch
env:
GITHUB_BRANCH: "master"
AWS_REGION_DEV: us-east-1
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
@@ -15,6 +14,8 @@ jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
id-token: write
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
@@ -27,6 +28,18 @@ jobs:
with:
python-version: 3.9 #install the python needed
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install boto3
- name: Configure AWS Credentials -- DEV
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: ${{ env.AWS_REGION_DEV }}
role-to-assume: ${{ secrets.DEV_IAM_ROLE_ARN }}
role-session-name: refresh-AWS-regions-dev
# Runs a single command using the runners shell
- name: Run a one-line script
run: python3 util/update_aws_services_regions.py