mirror of
https://github.com/outbackdingo/openapi-ui.git
synced 2026-01-27 10:19:49 +00:00
41 lines
1016 B
YAML
41 lines
1016 B
YAML
name: release
|
|
on:
|
|
push:
|
|
branches:
|
|
- '*'
|
|
tags:
|
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
|
|
|
|
env:
|
|
NODE_VERSION: 20.18.1
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- uses: benjlevesque/short-sha@v3.0
|
|
id: short-sha
|
|
with:
|
|
length: 8
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile.build
|
|
builder: default
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
tags: ${{ secrets.DOCKERHUB_USERNAME }}/openapi-ui:${{ github.head_ref || github.ref_name }}-${{ steps.short-sha.outputs.sha }
|
|
build-args: |
|
|
NODE_VERSION=${{ env.NODE_VERSION }}
|