-
Notifications
You must be signed in to change notification settings - Fork 4
61 lines (50 loc) · 1.84 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: ci
on:
push:
branches:
- main
pull_request:
release:
types:
- created
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: 15.12.0
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: node_modules
key: npm-${{ hashFiles('package-lock.json') }}
- run: npm install
- run: npm run lint
- run: npm run test
- id: docker_meta
uses: crazy-max/ghaction-docker-meta@c4ee3adeed93b1fa6a762f209fb01608c1a22f1e # v4.4.0
with:
images: docker.pkg.github.com/appvia/githubUserManager/githubUserManager
tag-sha: true
tag-latest: true
tag-semver: |
{{version}}
label-custom: |
org.opencontainers.image.vendor=appvia
org.opencontainers.image.documentation=https://github.com/appvia/githubUserManager
org.opencontainers.image.authors=Chris Nesbitt-Smith <chris.nesbitt-smith@appvia.io>
maintainer=appvia
- name: Login to docker registry
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # tag=v2.1.0
with:
registry: docker.pkg.github.com
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push to GitHub Packages
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4.0.0
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}