Skip to content

Promote LTS Channel #140

Promote LTS Channel

Promote LTS Channel #140

Workflow file for this run

# Promotes the current Stable channel to LTS on a schedule.
name: Promote LTS Channel
on:
schedule:
# 1:30 a.m. PST / 12:30 a.m. PDT, Mondays.
# Note that the job itself ensures it is running on the 2nd Monday of the
# month, since crontab does not support this condition.
- cron: '30 1 * * 1'
workflow_dispatch:
inputs:
amp-version:
description: 'AMP version number (13 digits)'
required: false
default: ''
type: string
auto-merge:
description: 'Enable PR auto-merge'
required: false
type: boolean
jobs:
get-day:
runs-on: ubuntu-latest
outputs:
day: ${{ steps.day.outputs.day }}
steps:
- name: Get day of the month
id: day
run: echo "day=$(date +%d)" >> $GITHUB_OUTPUT
promote-lts:
needs: get-day
# The 2nd Monday always falls between the 8th to the 14th of the month (inclusive).
if: github.event.inputs.amp-version || (8 <= needs.get-day.outputs.day && needs.get-day.outputs.day <= 14)
uses: ampproject/cdn-configuration/.github/workflows/promote-reusable-workflow.yml@main
with:
channel-name: 'LTS'
ts-file: 'promote-lts.ts'
amp-version: ${{ github.event.inputs.amp-version }}
auto-merge: ${{ github.event.inputs.auto-merge }}
check-freeze: true
secrets:
access-token: ${{ secrets.ACCESS_TOKEN }}