Skip to content

Merge pull request #3 from thin-edge:feat-add-default-env #4

Merge pull request #3 from thin-edge:feat-add-default-env

Merge pull request #3 from thin-edge:feat-add-default-env #4

Workflow file for this run

name: publish
on:
push:
tags:
- "*"
jobs:
# Wait until all other publishing jobs are finished
# before publishing the virtual packages (which are architecture agnostic)
publish-containers:
name: Publish Containers
runs-on: ubuntu-20.04
env:
BUILDX_NO_DEFAULT_ATTESTATIONS: 1
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0
- uses: extractions/setup-just@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
name=ghcr.io/thin-edge/opcua-device-gateway,enable=true
tags: |
type=raw,value={{tag}}
type=raw,value=latest
- name: Build and push
uses: docker/build-push-action@v5
with:
context: containers/opcua-device-gateway
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}