From 21ee2068a62447c3b3534cf659a6f0963faf45a7 Mon Sep 17 00:00:00 2001 From: Sergio Garcia <38561120+sergargar@users.noreply.github.com> Date: Thu, 23 Jun 2022 11:07:26 +0200 Subject: [PATCH] feat(actions): Create refresh_aws_services_regions.yml (#1225) --- .../refresh_aws_services_regions.yml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/refresh_aws_services_regions.yml diff --git a/.github/workflows/refresh_aws_services_regions.yml b/.github/workflows/refresh_aws_services_regions.yml new file mode 100644 index 0000000000..00fb213e83 --- /dev/null +++ b/.github/workflows/refresh_aws_services_regions.yml @@ -0,0 +1,50 @@ +# This is a basic workflow to help you get started with Actions + +name: Refresh regions of AWS services + +on: + schedule: + - cron: "10 9 * * *" #runs at 09:00 UTC everyday + +env: + GITHUB_BRANCH: "prowler-3.0-dev" + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + # 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 + - uses: actions/checkout@v3 + with: + ref: ${{ env.GITHUB_BRANCH }} + + - name: setup python + uses: actions/setup-python@v2 + with: + python-version: 3.9 #install the python needed + + # Runs a single command using the runners shell + - name: Run a one-line script + run: python3 util/update_aws_services_regions.py + + # Create pull request + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: "feat(regions_update): Update regions for AWS services." + branch: "aws-services-regions-updated" + labels: "status/waiting-for-revision, severity/low" + title: "feat(regions_update): Changes in regions for AWS services." + body: | + ### Description + + This PR updates the regions for AWS services. + + ### License + + By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.