-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (57 loc) · 1.61 KB
/
create-archives.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
name: Create Archives of Bootstrap Projects
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check_changes:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
bootstrap: ${{ steps.filter.outputs.bootstrap }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Filter changed files
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
bootstrap:
- 'bootstrap*/**'
create-archives:
runs-on: ubuntu-latest
needs: check_changes
if: ${{ needs.check_changes.outputs.bootstrap == 'true' }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Archive bootstrap-node
run: |
zip -r "archives/bootstrap-node.zip" "bootstrap-node/"
- name: Archive bootstrap-dotnet
run: |
zip -r "archives/bootstrap-dotnet.zip" "bootstrap-dotnet/"
- name: Archive bootstrap-go
run: |
zip -r "archives/bootstrap-go.zip" "bootstrap-go/"
- name: Commit archives
uses: EndBug/add-and-commit@v9
with:
add: 'archives/'
message: '[skip ci] Update bootstrap project archives'
default_author: github_actions
push: true
github_token: ${{ secrets.GITHUB_TOKEN }}