-
Notifications
You must be signed in to change notification settings - Fork 26
53 lines (46 loc) · 1.41 KB
/
promote.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Promote
on:
# Approximate "every 2 weeks" by doing 1st and 15th of the month.
schedule:
- cron: "0 07 01 * *"
- cron: "0 07 15 * *"
workflow_dispatch:
inputs:
from:
description: Tag to promote from
required: true
default: dev
to:
description: Tag to promote to
required: true
default: stable
jobs:
release:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.aws_access_key_id }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_access_key }}
AWS_DEFAULT_REGION: us-east-1
steps:
- id: prep
run: |
cat >>"$GITHUB_OUTPUT" <<EOM
from=${{ github.event.from || 'dev' }}
to=${{ github.event.to || 'stable' }}
EOM
- uses: restyled-io/sdk@main
with:
command: >
promote --yes ${{ steps.prep.outputs.from }} ${{ steps.prep.outputs.to }}
- name: Notify
if: always()
uses: zulip/github-actions-zulip/send-message@v1.0.2
with:
api-key: ${{ secrets.ZULIP_API_KEY }}
email: ${{ secrets.ZULIP_EMAIL }}
organization-url: ${{ secrets.ZULIP_ORGANIZATION_URL }}
to: 'changelog'
type: 'stream'
topic: 'Restylers Releases'
content: |
Promotion of `${{ steps.prep.outputs.from }}` to `${{ steps.prep.outputs.to }}`: ${{ job.status }}