-
Notifications
You must be signed in to change notification settings - Fork 143
71 lines (58 loc) · 2.33 KB
/
publish-nightly-channel.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Publish Channel (nightly)
on:
workflow_dispatch:
schedule:
# Publish 1 hour after nightlies start building
- cron: '0 1 * * *'
env:
NIGHTLY_CHANNEL_DIR: ./channel-fuel-nightly.toml.d/
jobs:
publish-channel:
name: Publish channel (nightly)
runs-on: ubuntu-latest
steps:
- name: checkout master
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install build-channel script
run: cargo install --debug --path ./ci/build-channel
- name: Publish nightly channel
id: setup
run: |
PUBLISHED_DATE=$(date +'%Y-%m-%d')
FORMATTED_PUBLISHED_DATE=$(date +'%Y/%m/%d')
mkdir -p ${{ env.NIGHTLY_CHANNEL_DIR }}
CHANNEL_TOML="channel-fuel-nightly.toml"
build-channel --nightly $CHANNEL_TOML $PUBLISHED_DATE --github-run-id $GITHUB_RUN_ID
cp $CHANNEL_TOML ${{ env.NIGHTLY_CHANNEL_DIR }}
echo "::set-output name=archive_dir::channels/nightly/${FORMATTED_PUBLISHED_DATE}"
- name: Deploy nightly channel (latest version)
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.REPO_TOKEN }}
publish_dir: ${{ env.NIGHTLY_CHANNEL_DIR }}
keep_files: true
destination_dir: ./
user_name: 'fuel-service-user'
user_email: 'fuel-service-user@users.noreply.github.com'
- name: Deploy nightly channel (archive)
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.REPO_TOKEN }}
publish_dir: ${{ env.NIGHTLY_CHANNEL_DIR }}
keep_files: true
destination_dir: ${{ steps.setup.outputs.archive_dir }}
user_name: 'fuel-service-user'
user_email: 'fuel-service-user@users.noreply.github.com'
- name: Notify if Job Fails
uses: ravsamhq/notify-slack-action@v1
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: "{workflow} has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>"
footer: ""
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TOOLING }}