-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (66 loc) · 1.93 KB
/
actions.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
72
73
74
75
76
77
78
79
name: CI/CD
on:
push:
branches:
- 'dev'
schedule:
- cron: '0 * * * *'
jobs:
build_and_deploy:
strategy:
matrix:
os: ['ubuntu-latest']
perl: [ '5.38', '5.36' ]
name: Perl ${{ matrix.perl }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
- name: Install Dependencies
run: |
cpm install
- name: Clone Source Data Repository
uses: actions/checkout@v4
with:
ref: master
repository: zengin-code/source-data
sparse-checkout: data
sparse-checkout-cone-mode: false
path: share
- name: GitHub Actionsの環境変数にデータ更新日を設定する
run: |
echo "UPDATED_AT=$(cat share/data/updated_at)" >> $GITHUB_ENV
- name: lib/Zengin/Perl.pm のバージョン番号書き換え
run: |
perl -wpi -E'/^our/ and /(\d{8})/ and s/$1/$ENV{UPDATED_AT}/e' lib/Zengin/Perl.pm
- name: Run Tests
run: |
git add -A
prove -lv t
git reset HEAD
- name: Checkout master branch
run: |
git fetch
git checkout master
git pull origin master
- name: Show current branch
run: git branch
- name: Show last commit
run: git log -1
- name: Commit and Push Changes
run: |
git config core.filemode false
if ! git diff --exit-code --quiet; then
git add -A
git config user.name github-actions
git config user.email [email protected]
git commit -m "Commit updated files"
git push origin master
else
echo "No changes to commit"
fi