Skip to content

Commit

Permalink
update release
Browse files Browse the repository at this point in the history
  • Loading branch information
thegecko committed Feb 23, 2024
1 parent 7dbb0f2 commit 52e65be
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
workflow_dispatch:
inputs:
tag:
description: Tag (e.g. 2.1.1. If set, publishes new containers)
required: false

jobs:
build:
Expand Down Expand Up @@ -38,15 +40,18 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/[email protected]
with:
images: |
ghcr.io/node-usb/${{ matrix.image }}
tags: |
type=raw,value=latest,enable=${{ github.event.inputs.tag != '' }}
type=raw,value=${{ github.event.inputs.tag }},enable=${{ github.event.inputs.tag != '' }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: ${{ matrix.image }}
tags: |
ghcr.io/node-usb/${{ matrix.image }}:latest
labels: |
org.opencontainers.image.version=1.0.0
org.opencontainers.image.source=${{ github.event.repository.html_url }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.licenses=GPL-3.0-only
push: startsWith(github.ref, 'refs/tags/')
push: ${{ github.event.inputs.tag != '' }}
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit 52e65be

Please sign in to comment.