RSS Feed Generator #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: RSS Feed Generator | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
rssgen: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Login to Docker | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${OWNER,,} | |
password: ${{ secrets.GHCR_PAT }} | |
env: | |
OWNER: ${{ github.repository_owner }} | |
- name: Pull Docker Image | |
run: | | |
docker pull ghcr.io/contrast-security-oss/contrast-documentation-rss/python3:1.0.1 | |
- name: Generate RSS by Python | |
run: | | |
docker-compose run python3 python java_rlsnote.py | |
docker-compose run python3 python dotnet_framework_rlsnote.py | |
docker-compose run python3 python dotnet_core_rlsnote.py | |
docker-compose run python3 python nodejs_rlsnote.py | |
docker-compose run python3 python nodejs_beta_rlsnote.py | |
docker-compose run python3 python nodejs_protect_rlsnote.py | |
docker-compose run python3 python go_rlsnote.py | |
docker-compose run python3 python python_rlsnote.py | |
docker-compose run python3 python ruby_rlsnote.py | |
docker-compose run python3 python php_rlsnote.py | |
docker-compose run python3 python contrast_rlsnote.py | |
docker-compose run python3 python java_support_tech.py | |
docker-compose run python3 python dotnet_framework_support_tech.py | |
docker-compose run python3 python dotnet_core_support_tech.py | |
docker-compose run python3 python nodejs_support_tech.py | |
docker-compose run python3 python go_support_tech.py | |
docker-compose run python3 python python_support_tech.py | |
docker-compose run python3 python ruby_support_tech.py | |
docker-compose run python3 python php_support_tech.py | |
- name: Commit updated files | |
run: | | |
git config core.filemode false | |
if ! git diff --exit-code --quiet ./files | |
then | |
git config user.name Taka Shiozaki | |
git config user.email [email protected] | |
git commit -m "Commit updated files" ./files/*.txt | |
git push | |
fi | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: rss_feeds | |
path: feeds | |
- uses: actions/upload-pages-artifact@v1 | |
with: | |
path: feeds | |
deploy: | |
needs: rssgen | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
permissions: | |
pages: write | |
id-token: write | |
steps: | |
- uses: actions/deploy-pages@v1 | |
id: deployment | |