-
Notifications
You must be signed in to change notification settings - Fork 282
35 lines (28 loc) · 875 Bytes
/
auto_restart.yml
File metadata and controls
35 lines (28 loc) · 875 Bytes
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
name: IBM Cloud Auto Restart
on:
# push:
# branches: [ master ]
# pull_request:
# branches: [ master ]
schedule:
- cron: 0 4 * * 5
# watch:
# types: [started]
jobs:
ibm-cloud-restart:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Cloud Foundry CLI
run: |
curl -L "https://packages.cloudfoundry.org/stable?release=linux64-binary&source=github&version=v6" | tar -zx
sudo mv cf /usr/local/bin
- name: Login Cloud Foundry
run: cf l -a https://api.us-south.cf.cloud.ibm.com login -u ${{ secrets.IBM_MAIL }} -p ${{ secrets.IBM_PWD }}
- name: Restart Cloud Foundry APP
run: cf restart ${{ secrets.IBM_APP_NAME }}
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@main
with:
retain_days: 2
keep_minimum_runs: 6