generated from nullplatform/technology-templates-nodejs-container
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (46 loc) · 1.5 KB
/
ci.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
name: ci-nullplatform
on:
push:
branches:
- master
- main
permissions:
id-token: write
contents: read
packages: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Start Nullplatform CI
id: setup-ci
uses: nullplatform/github-action-setup-ci@v1
with:
api-key: ${{ secrets.NULLPLATFORM_API_KEY }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Get build parameters
id: get-build-parameters
uses: nullplatform/github-action-secrets-and-variables@v1
with:
application-id: ${{ steps.setup-ci.outputs.application-id }}
- name: Build asset for ${{ steps.setup-ci.outputs.application-name }}
id: build-asset
uses: nullplatform/github-action-asset-build@v1
with:
options: BUILD_ARGS='--build-arg GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}'
- name: Push asset for ${{ steps.setup-ci.outputs.application-name }}
id: push-asset
uses: nullplatform/github-action-asset-push@v1
with:
build-id: ${{ steps.setup-ci.outputs.build-id }}
type: docker-image
- name: End Nullplatform CI
if: ${{ always() }}
id: end-setup-ci
uses: nullplatform/github-action-setup-ci@v1
with:
build-id: ${{ steps.setup-ci.outputs.build-id }}
status: ${{ contains(fromJSON('["failure", "cancelled"]'), job.status) && 'failed' || 'successful' }}