Skip to content

Commit 3b79a3e

Browse files
Add gh action wf to build test worker image
1 parent e6d4183 commit 3b79a3e

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Harness Worker Image
2+
3+
on:
4+
push:
5+
branches: [main, certification-worker]
6+
paths:
7+
- "Dockerfile"
8+
- "harness/**"
9+
- "src/**"
10+
- "package.json"
11+
- "package-lock.json"
12+
- ".github/workflows/harness-image.yml"
13+
release:
14+
types: [published]
15+
workflow_dispatch:
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
build-and-push:
23+
runs-on: ubuntu-latest
24+
permissions:
25+
contents: read
26+
packages: write
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
31+
- name: Set up QEMU
32+
uses: docker/setup-qemu-action@v3
33+
34+
- name: Set up Docker Buildx
35+
uses: docker/setup-buildx-action@v3
36+
37+
- name: Log in to GHCR
38+
uses: docker/login-action@v3
39+
with:
40+
registry: ghcr.io
41+
username: ${{ github.actor }}
42+
password: ${{ secrets.GITHUB_TOKEN }}
43+
44+
- name: Docker metadata
45+
id: meta
46+
uses: docker/metadata-action@v5
47+
with:
48+
images: ghcr.io/conductor-oss/javascript-sdk/harness-worker
49+
tags: |
50+
type=raw,value=latest
51+
type=raw,value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' }}
52+
53+
- name: Build and push
54+
uses: docker/build-push-action@v6
55+
with:
56+
context: .
57+
file: ./Dockerfile
58+
target: harness
59+
platforms: linux/amd64,linux/arm64
60+
push: true
61+
tags: ${{ steps.meta.outputs.tags }}

0 commit comments

Comments
 (0)