-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (39 loc) · 1.03 KB
/
push.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
name: Push
on:
push:
branches:
- main
pull_request:
permissions:
packages: write
# TODO:
# 1. split out the push action to separate action
# 2. add caching based on fork behaviour, use GHA cache or registry..
jobs:
build:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.build.outputs.tag }}
steps:
- uses: actions/checkout@v4
- id: context
uses: ./.github/actions/context
- uses: ./.github/actions/build
id: build
with:
node_env: production
latest: ${{ steps.context.outputs.is_release_master }}
push: ${{ steps.context.outputs.is_fork == 'false' }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
download:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/run
with:
tag: ${{ needs.build.outputs.tag }}
run: |
echo "Hello world"
npm run test