File tree 1 file changed +46
-15
lines changed
1 file changed +46
-15
lines changed Original file line number Diff line number Diff line change 6
6
paths-ignore :
7
7
- " README.md"
8
8
- " LICENSE"
9
- pull_request :
10
- branches :
11
- - main
12
- paths-ignore :
13
- - " README.md"
14
- - " LICENSE"
9
+ env :
10
+ image : ghcr.io/${{ github.repository }}/gha-summarizer
15
11
16
12
jobs :
13
+ build :
14
+ permissions :
15
+ contents : read
16
+ packages : write
17
+ runs-on : ubuntu-latest
18
+ outputs :
19
+ imageid : ${{ steps.docker_metadata.outputs.imageid }}
20
+ steps :
21
+ - name : Checkout
22
+ uses : actions/checkout@v4
23
+ with :
24
+ ref : ${{ github.event.pull_request.head.ref }}
25
+ repository : ${{ github.event.pull_request.head.repo.full_name }}
26
+
27
+ - name : Set up Docker metadata
28
+ id : docker_metadata
29
+ uses : docker/metadata-action@v5
30
+ with :
31
+ images : ${{ env.image }}
32
+ tags : |
33
+ type=ref,event=branch
34
+ type=ref,event=pr
35
+ type=ref,event=tag
36
+ type=sha
37
+
38
+ - name : Login to GitHub Container Registry
39
+ uses : docker/login-action@v3
40
+ with :
41
+ registry : ghcr.io
42
+ username : ${{ github.actor }}
43
+ password : ${{ secrets.GITHUB_TOKEN }}
44
+
45
+ - name : Build and push Docker image
46
+ uses : docker/build-push-action@v6
47
+ with :
48
+ push : ${{ github.event_name != 'pull_request_target' }}
49
+ tags : ${{ steps.docker_metadata.outputs.tags }}
50
+ labels : ${{ steps.docker_metadata.outputs.labels }}
51
+
17
52
test :
18
53
permissions :
19
54
contents : read
20
55
runs-on : ubuntu-latest
21
56
steps :
22
57
- name : Checkout
23
58
uses : actions/checkout@v4
59
+ with :
60
+ ref : ${{ github.event.pull_request.head.ref }}
61
+ repository : ${{ github.event.pull_request.head.repo.full_name }}
24
62
25
63
- name : Render template
26
- uses : ./
64
+ uses : docker://ghcr.io/void404/gha-summarizer/gha-summarizer@main
27
65
with :
28
- template : example/template.md
29
- out-file : out.md
30
-
31
- - name : Debug ls
32
- if : always()
33
- run : |
34
- ls -la
35
- ls -la ./gha-summarizer
66
+ args : example/template.md out.md
36
67
37
68
- name : Check if the rendered file is different
38
69
run : |
You can’t perform that action at this time.
0 commit comments