-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.15 KB
/
zip-package.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
---
name: "package files for production"
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- ".github/workflows/*"
- "**/*.md"
jobs:
package:
name: "zip files using view id as folder name"
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v2
- name: make temp dir for artifacts
run: mkdir bin
- name: read .env file
id: getenv
run: echo "file=$(cat .env)" >> $GITHUB_OUTPUT
- name: Get view id from file
env:
CONTENT: ${{ steps.getenv.outputs.file }}
id: view
run: |
view=$(echo $CONTENT | sed 's/VIEW="//;s/"//')
echo "vid=$view" >> $GITHUB_OUTPUT
- name: build image
run: docker compose build
- name: create primo package
env:
VIEW: ${{ steps.view.outputs.vid }}
run: docker compose run primo gulp create-package --view $VIEW
- name: extract package
run: 7z x -obin bin/${{ steps.view.outputs.vid }}.zip
- name: upload package
uses: actions/upload-artifact@v3
with:
name: ${{ steps.view.outputs.vid }}
path: |
bin
!bin/*.zip
...