-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (40 loc) · 1.24 KB
/
build_publish_docker_testing_images.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
name: build_publish_docker_testing_images
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
# Just run it
pull_request:
branches:
- 'main'
paths:
- 'testing/**'
push:
branches:
- main
paths:
- 'testing/**'
jobs:
publish-testing-image:
strategy:
matrix:
image: ["hirosystems-ordhook", "hirosystems-ordinals-api", "hirosystems-ordinals-explorer", "ordinals-ord"]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Login to Github Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_PKG_TOKEN }}
- name: Build and push Docker image to GitHub Container Registry
uses: docker/build-push-action@v6
with:
context: ./testing
file: ./testing/${{ matrix.image }}/Dockerfile
# push: ${{ (github.event_name != 'pull_request' && github.ref == 'refs/heads/main') || github.ref_type == 'tag' }}
push: true
tags: ghcr.io/${{ github.repository_owner }}/testing-${{ matrix.image }}:latest