Skip to content
This repository was archived by the owner on Jan 26, 2025. It is now read-only.

Commit 130dbab

Browse files
committed
Adding workflow for tags
1 parent f29f7f6 commit 130dbab

File tree

3 files changed

+83
-2
lines changed

3 files changed

+83
-2
lines changed

.github/workflows/main.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: main
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref_name }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
tags: [ 'v*.*.*' ]
10+
branches: [ 'main' ]
11+
12+
env:
13+
REGISTRY: ghcr.io
14+
15+
jobs:
16+
docker:
17+
runs-on:
18+
- self-hosted
19+
- ${{ matrix.runner }}
20+
permissions:
21+
contents: read
22+
packages: write
23+
id-token: write
24+
strategy:
25+
matrix:
26+
include:
27+
- docker_file: Dockerfile
28+
name: pipeline-watchdog-arm64
29+
arch: linux/arm64
30+
tag: ghcr.io/insight-platform/pipeline-watchdog-arm64
31+
runner: ARM64
32+
- docker_file: Dockerfile
33+
name: pipeline-watchdog-x86
34+
arch: linux/amd64
35+
tag: ghcr.io/insight-platform/pipeline-watchdog-x86
36+
runner: X64
37+
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v4
41+
42+
- name: Inject slug/short variables
43+
uses: rlespinasse/github-slug-action@v4.4.1
44+
45+
# Set up BuildKit Docker container builder to be able to build
46+
# multi-platform images and export cache
47+
# https://github.com/docker/setup-buildx-action
48+
- name: Set up Docker Buildx
49+
uses: docker/setup-buildx-action@v3.5.0
50+
51+
# https://github.com/docker/build-push-action
52+
- name: Build docker image for ${{ env.GITHUB_REF_SLUG }}
53+
uses: docker/build-push-action@v6.5.0
54+
with:
55+
file: ${{ matrix.docker_file }}
56+
platforms: ${{ matrix.arch }}
57+
tags: "${{matrix.tag}}:${{ env.GITHUB_REF_SLUG }}"
58+
load: true
59+
context: .
60+
cache-from: type=gha
61+
cache-to: type=gha,mode=max
62+
63+
# https://github.com/docker/login-action
64+
- name: Log into registry ${{ env.REGISTRY }}
65+
uses: docker/login-action@v3.3.0
66+
with:
67+
registry: ${{ env.REGISTRY }}
68+
username: ${{ github.actor }}
69+
password: ${{ github.token }}
70+
71+
# https://github.com/docker/build-push-action
72+
- name: Push docker image for ${{ env.GITHUB_REF_SLUG }}
73+
uses: docker/build-push-action@v6.5.0
74+
with:
75+
file: ${{ matrix.docker_file }}
76+
platforms: ${{ matrix.arch }}
77+
tags: "${{matrix.tag}}:${{ env.GITHUB_REF_SLUG }}"
78+
push: true
79+
context: .
80+
cache-from: type=gha
81+
cache-to: type=gha,mode=max
File renamed without changes.

samples/pipeline_monitoring/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ services:
6464
pipeline-watchdog:
6565
container_name: pipeline-watchdog
6666
build:
67-
context: ../..
68-
dockerfile: ./samples/pipeline_monitoring/Dockerfile
67+
context: ../../
68+
dockerfile: Dockerfile
6969
restart: unless-stopped
7070
network_mode: host
7171
volumes:

0 commit comments

Comments
 (0)