Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/ghcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: deploy_ghcr

on:
workflow_call:
inputs:
file:
required: true
type: string
context:
required: true
type: string
name:
required: true
type: string

jobs:
push-store-image:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: "Checkout GitHub Action"
uses: actions/checkout@main

- name: "Login to GitHub Container Registry"
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}

- name: "Build Inventory Image"
run: |
docker build ${{ inputs.context }} -f ${{ inputs.file }} --tag ghcr.io/azure-samples/explore-iot-operations/${{ inputs.name }}:latest
docker push ghcr.io/azure-samples/explore-iot-operations/${{ inputs.name }}:latest
12 changes: 12 additions & 0 deletions .github/workflows/industrial_data_simulator_ghcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: industrial_data_simulator_ghcr

on:
workflow_dispatch:

jobs:
call-docker-build:
uses: ./.github/workflows/ghcr.yml
with:
name: industrial-data-simulator
file: samples/industrial-data-simulator/Dockerfile
context: .
3 changes: 3 additions & 0 deletions samples/industrial-data-simulator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# syntax=docker/dockerfile:1

FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21-cbl-mariner2.0 AS build
LABEL org.opencontainers.image.source=https://github.com/Azure-Samples/explore-iot-operations
LABEL org.opencontainers.image.description="Industrial data simulator"
LABEL org.opencontainers.image.licenses=MIT

COPY ./lib /workdir/lib

Expand Down