-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (44 loc) · 1.19 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
51
52
53
54
55
56
57
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:
version: ${{ steps.build.outputs.version }}
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 }}
- uses: ./.github/actions/push
if: steps.context.outputs.is_fork == 'false'
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
download:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: ${{ needs.build.outputs.version }}
path: /tmp/
- name: Load image
shell: bash
run: |
docker load < /tmp/${{ needs.build.outputs.version }}
docker image ls