Skip to content

feat(communities): add Arkemis Community (#175) #228

feat(communities): add Arkemis Community (#175)

feat(communities): add Arkemis Community (#175) #228

Workflow file for this run

name: Release
permissions:
id-token: write
contents: write
on:
push:
branches:
- main
paths:
- ".github/workflows/release.yml"
- "awesome/**"
schedule:
- cron: "0 9 15 * *" # every 15th of the month at 9:00 AM UTC
workflow_dispatch:
inputs:
with_analytics:
description: "Render awesome data with analytics"
required: false
default: "true"
jobs:
render-data:
name: Render Data
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Python
id: setup-python
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: Setup Uv
id: setup-uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: |
uv.lock
pyproject.toml
- name: Setup environment
run: |
echo "Pipeline info"
echo " - OS: $(uname -mo)"
echo " - UV version: ${{ steps.setup-uv.outputs.uv-version }}"
echo " - Python version: ${{ steps.setup-python.outputs.python-version}}"
uv sync --all-extras
- name: Render awesome data
if: github.event_name == 'workflow_dispatch' && github.event.inputs.with_analytics == 'false'
run: |
uv run make release ARGS=--without-analytics
- name: Render awesome with analytics data
if: github.event_name == 'push' || github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.with_analytics == 'true')
env:
TOKEN_GITHUB_PUBLIC_API: ${{ secrets.TOKEN_GITHUB_PUBLIC_API }}
run: |
uv run make release
- name: Render awesome README.md
id: render-awesome
run: |
git config --global user.email "${{ secrets.ACTION_EMAIL }}"
git config --global user.name "FabrizioCafolla"
if [ -z "$(git status --porcelain)" ]; then
echo "Nothing to update"
echo "commit_sha=${{ github.sha }}" >> $GITHUB_OUTPUT
else
git add awesome/**/*
git add analytics/*
git commit -m "release(awesome): update awesome data"
git push
echo "commit_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
fi
- name: Trigger deployment workflow
uses: actions/github-script@v8
with:
github-token: ${{ secrets.ACTION_WORKFLOWS }}
retries: 3
script: |
const owner = 'italia-opensource';
const repo = 'italiaopensource.com';
const event_type = 'sync-database';
const ref = 'main';
const client_payload = {
"hash": "${{ steps.render-awesome.outputs.commit_sha }}",
"run_id": "${{ github.run_id }}",
};
github.rest.repos.createDispatchEvent({
owner,
repo,
event_type,
client_payload
});