Update README.md #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: UI Image | |
on: | |
push: | |
paths: | |
- 'ui/**' | |
- '.github/workflows/ui-image.yml' | |
branches: | |
- master | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
name: push UI docker image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: 'ui' | |
sparse-checkout-cone-mode: false | |
- name: Move UI files to root | |
run: | | |
ls -lah | |
shopt -s dotglob | |
mv ui/* . | |
rm -rf ui | |
ls -lah | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ohmyform/ui | |
tags: | | |
type=raw,value=latest | |
type=semver,pattern={{major}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{version}} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |