update github actions to add tags to docker images, only support node 16

This commit is contained in:
Matthias Nannt
2022-08-16 14:01:22 +02:00
parent 973f999756
commit c2d4a48fe3
2 changed files with 18 additions and 9 deletions

View File

@@ -7,7 +7,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ["14.x", "16.x"]
node: ["16.x"]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:

View File

@@ -7,7 +7,13 @@ name: Docker Build & Publish
on:
push:
branches: [main]
branches:
- "main"
tags:
- "v*.*.*"
pull_request:
branches:
- "main"
env:
# Use docker.io for Docker Hub if empty
@@ -22,11 +28,6 @@ jobs:
packages: write
steps:
- id: imageName
uses: ASzc/change-string-case-action@v2
with:
string: ${{ github.repository }}
- name: Checkout repository
uses: actions/checkout@v3
@@ -46,7 +47,15 @@ jobs:
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ steps.imageName.outputs.lowercase }}
images: ${{ env.REGISTRY }}/${{ github.repository }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
@@ -55,5 +64,5 @@ jobs:
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.REGISTRY }}/${{ steps.imageName.outputs.lowercase }}:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}