-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (52 loc) · 1.47 KB
/
release.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
name: Release workflow
on:
pull_request:
branches: main
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
name: 'Detect changes'
outputs:
dockerfiles: ${{ steps.filter.outputs.changes }}
steps:
- name: Check out the repo
uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
recover-id-object/scripts/Dockerfile:
- 'deps/concordium-rust-sdk/**'
- 'recover-id-object/**'
build-and-push:
needs: [ changes ]
if: needs.changes.outputs.dockerfiles != '[]'
strategy:
fail-fast: false
matrix:
dockerfile: ${{ fromJSON(needs.changes.outputs.dockerfiles) }}
runs-on: ubuntu-latest
environment: production
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.dockerfile }}
push: true
tags: concordium/recover-id-object:latest
cache-from: type=registry,ref=concordium/recover-id-object:latest
cache-to: type=inline