forked from ss14Starlight/space-station-14
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.39 KB
/
Copy pathdiscord-publish.yml
File metadata and controls
49 lines (40 loc) · 1.39 KB
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
name: Discord Publish
concurrency:
group: publish
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
environment:
name: prod
steps:
- name: Install dependencies
run: sudo apt-get install -y python3-paramiko python3-lxml
- uses: actions/checkout@v3
- name: Set up SSH
env:
ACTIONS_SSH_KEY: ${{ secrets.ACTIONS_SSH_KEY }}
TEST: ${{ secrets.TEST }}
run: |
mkdir -p ~/.ssh
echo "$ACTIONS_SSH_KEY" | tr -d '\r' > ~/.ssh/id_ed25519
echo "$TEST"
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Test SSH Connection
run: ssh -T git@github.com || exit 0
- name: Publish changelog (Discord)
run: Tools/actions_changelogs_since_last_run.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ vars.GITHUB_REPOSITORY }}
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
- name: Commit and push changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add "Resources/Changelog/ChangelogStarlight.yml"
git add "Tools/changelogs/sent_changelog_ids.yml"
git commit -m "Update sended changelogs [skip ci]"
git push git@github.com:${{ github.repository }}.git HEAD:Starlight