-
Notifications
You must be signed in to change notification settings - Fork 6
64 lines (53 loc) · 1.89 KB
/
Copy pathci.yml
File metadata and controls
64 lines (53 loc) · 1.89 KB
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
name: ci
on:
push:
branches:
- main
pull_request:
release:
types:
- created
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 18.20.0
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
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@c99871dec2022cc055c062a10cc1a1310835ceb4 # v4.3.0
with:
registry: docker.pkg.github.com
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push to GitHub Packages
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}