Skip to content

Merge pull request #14 from Phyzait/main #35

Merge pull request #14 from Phyzait/main

Merge pull request #14 from Phyzait/main #35

Workflow file for this run

name: 1.12.2-publish
on:
push:
branches: [ "main" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226
- name: Log into dockerHUB
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_SK }}
- name: Generate Docker metadata
uses: docker/metadata-action@v5
with:
images: |
WHF-Studio/mohist-docker
tags: |
value=mohist-docker:1.12.2,value=mohist-docker:latest-1.12.2
labels: |
org.opencontainers.image.title=mohist-docker
org.opencontainers.image.description=A Docker image for running the Mohist server
org.opencontainers.image.url=https://hub.docker.com/r/WHF-Studio/mohist-docker
org.opencontainers.image.source=https://github.com/WHF-Studio/mohist-docker
org.opencontainers.image.author=敖律风
- name: Build dependencies Docker image
uses: docker/build-push-action@v5
with:
tags: mohist-docker:build-1.12.2
target: build-1.12.2
no-cache: true
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
target: run-1.12.2
no-cache: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}