Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabrizio Cafolla committed May 18, 2024
1 parent e9d78a8 commit e757d68
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 54 deletions.
66 changes: 20 additions & 46 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: Release

env:
AWS_REGION: ${{ vars.AWS_REGION }}

permissions:
id-token: write
contents: write
Expand All @@ -12,54 +9,31 @@ on:
branches:
- main
paths:
- '.github/workflows/release.yml'
- 'awesome/**'
- ".github/workflows/release.yml"
- "awesome/**"
workflow_dispatch:


jobs:
render-data:
name: Render Data
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
token: ${{ secrets.GITHUB_TOKEN }}

- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.AWS_ROLE_NAME }}
aws-region: ${{ env.AWS_REGION }}
mask-aws-account-id: no

- name: Set up Python 3.9
uses: actions/setup-python@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: "3.11"

- name: Setup
run: |
make setup-ci
- name: Get changed files in the docs folder
id: changed-files-specific
uses: tj-actions/changed-files@v35
with:
files: |
awesome/opensource/data/*.json
awesome/companies/data/*.json
awesome/communities/data/*.json
awesome/digital-nomads/data/*.json
- name: Notify SQS
env:
SQS_URL_DATA_INGESTION: ${{ secrets.SQS_URL_DATA_INGESTION }}
run: |
python3 scripts/notify.py --changed-files '${{ toJSON(steps.changed-files-specific.outputs) }}'
make lint
- name: Render awesome README.md
run: |
Expand All @@ -77,16 +51,16 @@ jobs:
- name: Trigger deployment workflow
uses: actions/github-script@v6
with:
github-token: ${{ secrets.ACTION_WORKFLOWS }}
retries: 3
script: |
const owner = 'italia-opensource';
const repo = 'infrastructure';
const event_type = 'deployment';
const ref = 'main';
github-token: ${{ secrets.ACTION_WORKFLOWS }}
retries: 3
script: |
const owner = 'italia-opensource';
const repo = 'infrastructure';
const event_type = 'deployment';
const ref = 'main';
github.rest.repos.createDispatchEvent({
owner,
repo,
event_type
});
github.rest.repos.createDispatchEvent({
owner,
repo,
event_type
});
19 changes: 11 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,27 @@ on:
branches:
- main
paths:
- '.github/workflows/test.yml'
- 'awesome/**'
- ".github/workflows/test.yml"
- "awesome/**"
- "scheme/**"
- "scripts/render.py"
- "scripts/check.py"
types: [opened, synchronize]

jobs:
test-data:
name: Test Data
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: "3.11"

- name: Setup and test
run: |
make setup-ci
make lint
make lint

0 comments on commit e757d68

Please sign in to comment.