-
Notifications
You must be signed in to change notification settings - Fork 12
94 lines (84 loc) · 2.56 KB
/
pr.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: "pr"
on: [pull_request]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: |
npm-
- run: |
npm ci
npm run build
npm run format-check
npm run lint
npm run package
npm run test
- name: Check for changes
id: diff
continue-on-error: true
run: git diff --quiet dist
self-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: docker build
id: build
uses: ./
with:
file: __tests__/Dockerfile
password: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_KEY_NOBASE64 }}
repository: eu.gcr.io/tradeshift-base/actions-docker
- name: Check that push worked
run: |
docker pull ${{ steps.build.outputs.image }}
self-check-custom-tag:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: docker build
id: build
uses: ./
with:
file: __tests__/Dockerfile
skip-default-tag: true
password: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_KEY_NOBASE64 }}
repository: eu.gcr.io/tradeshift-base/actions-docker-custom
tags: |
eu.gcr.io/tradeshift-base/actions-docker-custom:my-tag-${{ github.event.pull_request.head.sha }}
- name: Check that push worked
run: |
docker pull ${{ steps.build.outputs.image }}
- name: Check that skip works
run: |
if docker pull eu.gcr.io/tradeshift-base/actions-docker-custom:${{ github.event.pull_request.head.sha }}; then
echo "Tag found while expected to be missing";
exit 1;
fi;
echo "Confirmed: Default tag not found"
semantic-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Dry-run release
uses: tradeshift/actions-semantic-release@v1
id: semantic-release
with:
dry_run: true
check_name: Semantic release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Lint commit messages
uses: tradeshift/commitlint-github-action@v5