Sync all github releases with erlang.org #36803
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
## %CopyrightBegin% | |
## | |
## Copyright Ericsson AB 2024. All Rights Reserved. | |
## | |
## Licensed under the Apache License, Version 2.0 (the "License"); | |
## you may not use this file except in compliance with the License. | |
## You may obtain a copy of the License at | |
## | |
## http://www.apache.org/licenses/LICENSE-2.0 | |
## | |
## Unless required by applicable law or agreed to in writing, software | |
## distributed under the License is distributed on an "AS IS" BASIS, | |
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
## See the License for the specific language governing permissions and | |
## limitations under the License. | |
## | |
## %CopyrightEnd% | |
name: Sync all github releases with erlang.org | |
## Sync all github releases every hour | |
on: | |
workflow_dispatch: | |
schedule: | |
## In UTC | |
- cron: '0 * * * *' | |
## Needed to create releases | |
permissions: | |
contents: read | |
## 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 | |
permissions: | |
## Needed to create releases | |
contents: write | |
actions: write | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/[email protected] | |
## 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 |