-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (60 loc) · 1.77 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
---
name: Pull request build
on:
pull_request:
branches:
- master
jobs:
lint:
runs-on: ubuntu-latest
name: Lint project
permissions:
pull-requests: write
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Lint sources
uses: docker://ghcr.io/github/super-linter:slim-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: false
IGNORE_GITIGNORED_FILES: true
IGNORE_GENERATED_FILES: true
VALIDATE_DOCKERFILE: true
VALIDATE_EDITORCONFIG: true
VALIDATE_GITHUB_ACTIONS: true
VALIDATE_MARKDOWN: true
VALIDATE_SHELL_SHFMT: true
VALIDATE_YAML: true
build:
runs-on: ubuntu-latest
needs: [lint]
name: Build docker image
permissions:
pull-requests: read
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Docker Buildx
uses: docker/[email protected]
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('Dockerfile', '.dockerignore') }}
- name: Build docker image (no push)
uses: docker/[email protected]
with:
context: .
build-args: |
VCS_REF=${{ github.sha }}
BUILD_DATE=$(date +'%Y-%m-%d')
VERSION=testing
tags: tomerfi/version-bumper:testing
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
load: true
- name: Delete docker image
run: docker image rm tomerfi/version-bumper:testing