Skip to content

Sync all github releases with erlang.org #1867

Sync all github releases with erlang.org

Sync all github releases with erlang.org #1867

name: Sync all github releases with erlang.org
## Sync all github releases + prs every hour
on:
workflow_dispatch:
schedule:
## In UTC
- cron: '0 * * * *'
## Build base images to be used by other github workflows
jobs:
sync-releases:
if: github.repository == 'erlang/otp'
concurrency: sync-github-releases
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
## We need to login to the package registry in order to pull
## the base debian image.
- name: Docker login
run: docker login https://ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
- name: Sync releases
env:
ERLANG_ORG_TOKEN: ${{ secrets.TRIGGER_ERLANG_ORG_BUILD }}
run: >
.github/scripts/sync-github-releases.sh ${{ github.repository }}
"Bearer ${{ secrets.GITHUB_TOKEN }}" "^[2-9][1-9]\\..*" 25m
sync-prs:
if: github.repository == 'erlang/otp'
concurrency: erlang.github.io-deploy
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.ERLANG_TOKEN }}
repository: 'erlang/erlang.github.io'
path: erlang.github.io
- uses: actions/checkout@v3
- name: Update PRs
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
git clone https://github.com/talentdeficit/jsx
(cd jsx && rebar3 compile)
rm -rf "${GITHUB_WORKSPACE}/erlang.github.io/.git"
mkdir -p "${GITHUB_WORKSPACE}/erlang.github.io/prs/"
touch "${GITHUB_WORKSPACE}/erlang.github.io/.nojekyll"
.github/scripts/sync-github-prs.es erlang/otp "${GITHUB_WORKSPACE}/erlang.github.io/prs/"
- name: Deploy to github pages 🚀
uses: JamesIves/[email protected]
with:
token: ${{ secrets.ERLANG_TOKEN }}
branch: master # The branch the action should deploy to.
folder: erlang.github.io # The folder the action should deploy.
repository-name: erlang/erlang.github.io
single-commit: true