Skip to content

feat(opensource): added version-wizard (#116) #139

feat(opensource): added version-wizard (#116)

feat(opensource): added version-wizard (#116) #139

Workflow file for this run

name: Release
env:
AWS_REGION: ${{ vars.AWS_REGION }}
permissions:
id-token: write
contents: write
on:
push:
branches:
- main
paths:
- '.github/workflows/release.yml'
- 'awesome/**'
workflow_dispatch:
jobs:
render-data:
name: Render Data
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v3
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
with:
python-version: 3.9
- 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) }}'
- name: Render awesome README.md
run: |
python3 scripts/render.py
git config --global user.email "${{ secrets.ACTION_EMAIL }}"
git config --global user.name "FabrizioCafolla"
if [ -z "$(git status --porcelain)" ]; then
echo "Nothing to update"
else
git add awesome/**/README.md
git commit -m "release(awesome): Update README.md"
git push
fi
- 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.rest.repos.createDispatchEvent({
owner,
repo,
event_type
});