generated from homecentr/docker-template
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 836 Bytes
/
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
name: CI PR/Branch
on:
push:
branches-ignore:
- master
pull_request:
env:
IMAGE_NAME: "homecentr/haraka-relay"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
steps:
- uses: actions/checkout@master
- name: Set tag var
id: vars
run: echo ::set-output name=docker_tag::$(echo ${GITHUB_REF} | cut -d'/' -f3)-${GITHUB_SHA}
- name: Verify Dockerfile with Hadolint
uses: brpaz/hadolint-action@master
- name: Install dependencies
run: yarn
- name: Build Docker image
run: yarn build
- name: Test Docker image
run: yarn test
env: # To allow downloading packages
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}