-
Notifications
You must be signed in to change notification settings - Fork 39
66 lines (57 loc) · 1.78 KB
/
master_build.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
66
name: Master build
on:
push:
branches:
- master
jobs:
build-push:
runs-on: ubuntu-20.04
outputs:
registry-path: ${{ steps.push-to-quay.outputs.registry-path }}
registry-paths: ${{ steps.push-to-quay.outputs.registry-paths }}
steps:
- uses: actions/checkout@v2
- name: node.js 18
uses: actions/setup-node@v2
with:
node-version: 18.8.0
registry-url: https://registry.npmjs.org/
cache: 'npm'
- name: set up git
run: git config --global url."https://github.com/".insteadOf "ssh://[email protected]/"
- name: installing
run: npm ci
- name: build image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: governance
tags: ${{ github.sha }} latest
dockerfiles: |
./Dockerfile
build-args: |
version_number=${{ github.sha }}
- name: Push To quay.io
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: quay.io/decentraland
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"
deployment:
needs: [build-push]
name: "Deploy to dev"
runs-on: ubuntu-latest
steps:
- name: Trigger deployment
id: deploy
uses: decentraland/dcl-deploy-action@main
with:
dockerImage: "${{ needs.build-push.outputs.registry-path }}"
serviceName: governance2
env: dev
token: ${{ secrets.GITHUB_TOKEN }}