forked from peter-evans/create-pull-request-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
856 lines (785 loc) · 26 KB
/
test-command.yml
File metadata and controls
856 lines (785 loc) · 26 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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
name: test-command
on:
repository_dispatch:
types: [test-command]
jobs:
clean:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Clean up pull requests and branches
- name: Close Pull Requests
uses: ./.github/close-pull-requests
- name: Close Pull Requests
uses: ./.github/close-pull-requests
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: peter-evans/create-pull-request-tests-remote
- name: Close Pull Requests
uses: ./.github/close-pull-requests
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: peter-evans/create-pull-request-tests-remote-private
# Delete the test branch created in the fork
- uses: actions/checkout@v2
with:
token: ${{ secrets.CPR_MACHINE_USER_TOKEN }}
repository: create-pull-request-machine-user/create-pull-request-tests
ref: master
path: create-pull-request-machine-user-fork
- name: Delete fork branches
working-directory: create-pull-request-machine-user-fork
run: |
git fetch
git push --force --delete origin refs/heads/tests/push-branch-to-fork || true
beforeTest:
needs: clean
runs-on: ubuntu-latest
steps:
# Get the target repository and branch
- name: Get the target repository and branch
id: vars
run: |
repository=${{ github.event.client_payload.slash_command.repository }}
if [[ -z "$repository" ]]; then repository="peter-evans/create-pull-request"; fi
echo ::set-output name=repository::$repository
branch=${{ github.event.client_payload.slash_command.branch }}
if [[ -z "$branch" ]]; then branch="master"; fi
echo ::set-output name=branch::$branch
build=${{ github.event.client_payload.slash_command.build }}
if [[ -z "$build" ]]; then build="false"; fi
echo ::set-output name=build::$build
# Checkout the branch to test
- uses: actions/checkout@v2
with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
repository: ${{ steps.vars.outputs.repository }}
ref: ${{ steps.vars.outputs.branch }}
# Build
- if: steps.vars.outputs.build == 'true'
uses: actions/setup-node@v1
with:
node-version: 12.x
- if: steps.vars.outputs.build == 'true'
uses: actions/setup-python@v2
with:
python-version: '3.x'
- if: steps.vars.outputs.build == 'true'
run: |
npm ci
npm run clean
npm run build
npm run format-check
npm run lint
npm run test
npm run package
rm -rf node_modules
# Create an artifact from the action
- uses: actions/upload-artifact@v1
with:
name: create-pull-request
path: .
createRunLink:
needs: beforeTest
runs-on: ubuntu-latest
steps:
- name: Create URL to the run output
id: vars
run: echo ::set-output name=run-url::https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
- name: Update comment
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
body: |
> [Command run output][1]
[1]: ${{ steps.vars.outputs.run-url }}
testCreate:
needs: beforeTest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
id: cpr
uses: ./create-pull-request-local
with:
commit-message: Add report file
committer: GitHub <noreply@github.com>
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
title: '[Example] Add report file'
body: |
New report
- Contains *today's* date
- Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: report, automated pr
assignees: peter-evans
reviewers: peter-evans
milestone: 1
branch: tests/branch/create-update
- name: Create or Update Project Card
uses: peter-evans/create-or-update-project-card@v1
with:
project-name: Example Project
column-name: To do
issue-number: ${{ steps.cpr.outputs.pull-request-number }}
testUpdate:
needs: testCreate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
id: cpr
uses: ./create-pull-request-local
with:
commit-message: Add report file
committer: GitHub <noreply@github.com>
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
title: '[Example] Add report file (updated)'
body: |
New report (updated)
- Contains *today's* date
- Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: report, automated pr
assignees: peter-evans
reviewers: peter-evans
milestone: 1
branch: tests/branch/create-update
- name: Create or Update Project Card
uses: peter-evans/create-or-update-project-card@v1
with:
project-name: Example Project
column-name: To do
issue-number: ${{ steps.cpr.outputs.pull-request-number }}
testIdenticalChangeCreate:
needs: beforeTest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
run: echo "some data" > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
title: testIdenticalChange
branch: tests/branch/identical-change
testIdenticalChangeUpdate:
needs: testIdenticalChangeCreate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
run: echo "some data" > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
title: testIdenticalChange
branch: tests/branch/identical-change
testNoDiffCreate:
needs: beforeTest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
title: testNoDiff
branch: tests/branch/no-diff
testNoDiffUpdate:
needs: testNoDiffCreate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
# Running with no update effectively reverts the branch back to match the base
- name: Create Pull Request
uses: ./create-pull-request-local
with:
title: testNoDiff
branch: tests/branch/no-diff
testCommitsOnBaseCreate:
needs: beforeTest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Create test base branch
- name: Create test base
run: |
git config user.name 'CPR Test User'
git config user.email 'cpr-test-user@users.noreply.github.com'
git push --force origin HEAD:refs/heads/tests/base/commits-on-base
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
title: testCommitsOnBase
branch: tests/branch/commits-on-base
base: tests/base/commits-on-base
testCommitsOnBaseCommit:
needs: testCommitsOnBaseCreate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: tests/base/commits-on-base
# Create commits on the test base branch
- name: Create commits
run: |
git config user.name 'CPR Test User'
git config user.email 'cpr-test-user@users.noreply.github.com'
date +%s > report.txt
git commit -am "Commit on base 1"
date +%s > new-report.txt
git add -A
git commit -m "Commit on base 2"
git push
testCommitsOnBaseUpdate:
needs: testCommitsOnBaseCommit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: tests/base/commits-on-base
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
title: testCommitsOnBase
branch: tests/branch/commits-on-base
base: tests/base/commits-on-base
testCommitsOnWorkingBase:
needs: beforeTest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create commits
run: |
git config user.name 'CPR Test User'
git config user.email 'cpr-test-user@users.noreply.github.com'
date +%s > report.txt
git commit -am "Commit during workflow 1"
date +%s > new-report.txt
git add -A
git commit -m "Commit during workflow 2"
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
title: testCommitsOnWorkingBase
branch: tests/branch/commits-on-working-base
testWorkingBaseNotBaseSetup:
needs: beforeTest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Create test base branch
- name: Create test base
run: |
git config user.name 'CPR Test User'
git config user.email 'cpr-test-user@users.noreply.github.com'
date +%s > report.txt
git commit -am "This commit should not appear in pr branches"
git push --force origin HEAD:refs/heads/tests/base/working-base-not-base
testWorkingBaseNotBaseCreate:
needs: testWorkingBaseNotBaseSetup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: tests/base/working-base-not-base
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
title: testWorkingBaseNotBase
branch: tests/branch/working-base-not-base
base: master
testMultiPlatform:
needs: beforeTest
name: testCreateMultiPlatform on ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
if: matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest'
run: date +%s > report.txt
- name: Create report file (windows)
if: matrix.platform == 'windows-latest'
run: echo %DATE% %TIME% > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
committer: Peter Evans <peter-evans@users.noreply.github.com>
title: testMultiPlatform on ${{ matrix.platform }}
branch: tests/multi-platform
branch-suffix: random
testGitConfigSetUser:
needs: beforeTest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Set user in git config
run: |
git config user.name 'CPR Test User'
git config user.email 'cpr-test-user@users.noreply.github.com'
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
title: testGitConfigSetUser
branch: tests/git-config-set-user
testGitConfigSetCommitterAuthor:
needs: beforeTest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Set committer and author in git config
run: |
git config committer.name 'CPR Test Committer'
git config committer.email 'cpr-test-committer@users.noreply.github.com'
git config author.name 'CPR Test Author'
git config author.email 'cpr-test-author@users.noreply.github.com'
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
title: testGitConfigSetCommitterAuthor
branch: tests/git-config-set-committer-author
testCreateDraft:
needs: beforeTest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
title: testCreateUpdateDraft
branch: tests/create-update-draft
draft: true
testUpdateDraft:
needs: testCreateDraft
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
title: testCreateUpdateDraft
branch: tests/create-update-draft
draft: true
testCreateWithPAT:
needs: beforeTest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
title: testCreateUpdateWithPAT
branch: tests/create-update-with-pat
testUpdateWithPAT:
needs: testCreateWithPAT
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
title: testCreateUpdateWithPAT
branch: tests/create-update-with-pat
testCreateInRemoteRepo:
needs: beforeTest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: peter-evans/create-pull-request-tests-remote
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
title: testCreateInRemoteRepo
branch: tests/create-in-remote-repo
testCreateInRemotePrivateRepo:
needs: beforeTest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: peter-evans/create-pull-request-tests-remote-private
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
title: testCreateInRemotePrivateRepo
branch: tests/create-in-remote-private-repo
testCreateWithRelativePath:
needs: beforeTest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: relative-path
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
working-directory: relative-path
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
path: relative-path
title: testCreateWithRelativePath
branch: tests/create-with-relative-path
testPushLFSTrackedFile:
needs: beforeTest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create LFS tracked file
run: |
git lfs track "*.dat"
date +%s > large_file.dat
- name: Create Pull Request
uses: ./create-pull-request-local
with:
title: testPushLFSTrackedFile
branch: tests/push-lfs-tracked-file
testCreateBranchViaSSH:
needs: beforeTest
runs-on: ubuntu-latest
steps:
# Checkout via SSH
- uses: actions/checkout@v2
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
title: testCreateBranchViaSSH
branch: tests/create-branch-via-ssh
testCreateWithAppAuth:
needs: beforeTest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- uses: peter-evans/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.CPR_AUTH_APP_ID }}
private_key: ${{ secrets.CPR_AUTH_APP_PRIVATE_KEY }}
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
token: ${{ steps.generate-token.outputs.token }}
title: testCreateWithAppAuth
branch: tests/create-with-app-auth
testPushBranchToFork:
needs: beforeTest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set the remote URL to the machine user's fork
run: |
git remote set-url origin https://${{ secrets.CPR_MACHINE_USER_TOKEN }}:x-oauth-basic@github.com/create-pull-request-machine-user/create-pull-request-tests
git fetch --unshallow -p origin
git push --force
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
token: ${{ secrets.CPR_MACHINE_USER_TOKEN }}
title: testPushBranchToFork
branch: tests/push-branch-to-fork
request-to-parent: true
testNoDiffPushBranchToFork:
needs:
- beforeTest
# Added here because the jobs can compete updating the remote base and fail
- testPushBranchToFork
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set the remote URL to the machine user's fork
run: |
git remote set-url origin https://${{ secrets.CPR_MACHINE_USER_TOKEN }}:x-oauth-basic@github.com/create-pull-request-machine-user/create-pull-request-tests
git fetch --unshallow -p origin
git push --force
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
- name: Create Pull Request
uses: ./create-pull-request-local
with:
token: ${{ secrets.CPR_MACHINE_USER_TOKEN }}
title: testNoDiffPushBranchToFork
branch: tests/no-diff-push-branch-to-fork
request-to-parent: true
testAlpineContainer:
needs: beforeTest
runs-on: ubuntu-latest
container:
image: alpine
steps:
- name: Install dependencies
run: |
apk --no-cache add git python3
python3 -m ensurepip
- uses: actions/checkout@v2
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
title: testAlpineContainer
branch: tests/alpine-container
testUbuntuContainer:
needs: beforeTest
runs-on: ubuntu-latest
container:
image: ubuntu
steps:
- name: Install dependencies
run: |
apt-get update
apt-get install -y software-properties-common
add-apt-repository -y ppa:git-core/ppa
apt-get install -y python3 python3-pip git
- uses: actions/checkout@v2
# Download the action artifact
- uses: actions/download-artifact@v1
with:
name: create-pull-request
path: create-pull-request-local
# Test
- name: Create report file
run: date +%s > report.txt
- name: Create Pull Request
uses: ./create-pull-request-local
with:
title: testUbuntuContainer
branch: tests/ubuntu-container
afterTest:
needs:
- createRunLink
- testUpdate
- testIdenticalChangeUpdate
- testNoDiffUpdate
- testCommitsOnBaseUpdate
- testCommitsOnWorkingBase
- testWorkingBaseNotBaseCreate
- testMultiPlatform
- testGitConfigSetUser
- testGitConfigSetCommitterAuthor
- testUpdateDraft
- testUpdateWithPAT
- testCreateInRemoteRepo
- testCreateInRemotePrivateRepo
- testCreateWithRelativePath
- testCreateBranchViaSSH
- testCreateWithAppAuth
- testNoDiffPushBranchToFork
- testPushLFSTrackedFile
- testAlpineContainer
- testUbuntuContainer
runs-on: ubuntu-latest
steps:
# Add reaction to the comment
- name: Add reaction
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reaction-type: hooray