Skip to content

Commit 9e57afd

Browse files
committed
intermittent change to test images
1 parent 77026d4 commit 9e57afd

2 files changed

Lines changed: 19 additions & 5 deletions

File tree

.github/workflows/build-image.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@ name: Build sandbox image
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main, init]
66
paths:
77
- "docker/**"
88
- ".github/workflows/build-image.yml"
99
repository_dispatch:
1010
types: [code-repo-updated]
1111
workflow_dispatch:
12+
inputs:
13+
code_ref:
14+
description: "Ref of workshop-nexus-intro-code to build against (branch, tag, or sha)"
15+
required: false
16+
default: "init"
1217

1318
jobs:
1419
build:
@@ -21,24 +26,33 @@ jobs:
2126
steps:
2227
- uses: actions/checkout@v4
2328

24-
- name: Checkout workshop-nexus-intro-code (private)
29+
- name: Checkout workshop-nexus-intro-code
2530
uses: actions/checkout@v4
2631
with:
2732
repository: temporalio/workshop-nexus-intro-code
28-
token: ${{ secrets.WORKSHOP_CODE_PAT }}
2933
path: workshop-nexus-intro-code
34+
ref: ${{ github.event.inputs.code_ref || (github.ref_name == 'main' && 'main' || 'init') }}
3035

3136
- uses: docker/login-action@v3
3237
with:
3338
registry: ghcr.io
3439
username: ${{ github.actor }}
3540
password: ${{ secrets.GITHUB_TOKEN }}
3641

42+
- name: Compute image tags
43+
id: tags
44+
run: |
45+
if [ "${{ github.ref_name }}" = "main" ]; then
46+
echo "extra=${{ env.IMAGE }}:latest" >> "$GITHUB_OUTPUT"
47+
else
48+
echo "extra=${{ env.IMAGE }}:${{ github.ref_name }}" >> "$GITHUB_OUTPUT"
49+
fi
50+
3751
- uses: docker/build-push-action@v6
3852
with:
3953
context: .
4054
file: docker/Dockerfile
4155
push: true
4256
tags: |
43-
${{ env.IMAGE }}:latest
57+
${{ steps.tags.outputs.extra }}
4458
${{ env.IMAGE }}:${{ github.sha }}

instruqt/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: "3"
22
containers:
33
- name: workshop
4-
image: ghcr.io/temporalio/workshop-nexus-intro-sandbox:latest
4+
image: ghcr.io/temporalio/workshop-nexus-intro-sandbox:init
55
shell: /bin/bash
66
memory: 4096

0 commit comments

Comments
 (0)