-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.07 KB
/
slackwatch.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
name: Build and Push Slackwatch Image
on:
push:
branches:
- main
paths:
- 'src/**'
- 'Dockerfile'
- 'assets/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/slackwatch.yml'
concurrency:
group: "slackwatch"
cancel-in-progress: true
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to GitHub Container Registry
run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
tags: ghcr.io/slackspace-io/slackwatch:preview,ghcr.io/slackspace-io/slackwatch:${{ github.sha }}
cache-from: type=registry,ref=ghcr.io/slackspace-io/slackwatch:pr-build-cache
cache-to: type=registry,ref=ghcr.io/slackspace-io/slackwatch:pr-build-cache,mode=max