Skip to content

intermittent change to test images #1

intermittent change to test images

intermittent change to test images #1

Workflow file for this run

name: Build sandbox image
on:
push:
branches: [main, init]
paths:
- "docker/**"
- ".github/workflows/build-image.yml"
repository_dispatch:
types: [code-repo-updated]
workflow_dispatch:
inputs:
code_ref:
description: "Ref of workshop-nexus-intro-code to build against (branch, tag, or sha)"
required: false
default: "init"
jobs:
build:
runs-on: ubuntu-latest
env:
IMAGE: ghcr.io/temporalio/workshop-nexus-intro-sandbox
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Checkout workshop-nexus-intro-code
uses: actions/checkout@v4
with:
repository: temporalio/workshop-nexus-intro-code
path: workshop-nexus-intro-code
ref: ${{ github.event.inputs.code_ref || (github.ref_name == 'main' && 'main' || 'init') }}
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Compute image tags
id: tags
run: |
if [ "${{ github.ref_name }}" = "main" ]; then
echo "extra=${{ env.IMAGE }}:latest" >> "$GITHUB_OUTPUT"
else
echo "extra=${{ env.IMAGE }}:${{ github.ref_name }}" >> "$GITHUB_OUTPUT"
fi
- uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile
push: true
tags: |
${{ steps.tags.outputs.extra }}
${{ env.IMAGE }}:${{ github.sha }}