Skip to content

ci: trigger on tag

ci: trigger on tag #19

Workflow file for this run

name: deploy
on:
push:
tags: ["v*.*.*"]
branches:
- MC1_39
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log into registry Aliyun Container Registry
uses: docker/login-action@v3
with:
registry: registry.cn-shanghai.aliyuncs.com
username: ${{ secrets.ALI_CR_USERNAME }}
password: ${{ secrets.ALI_CR_PASSWORD }}
- name: Extract mw Docker Metadata
id: mw_meta
uses: docker/metadata-action@v5
with:
images: |
registry.cn-shanghai.aliyuncs.com/prts/mw
ghcr.io/mooncellwiki/mw
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: .github/workflows/mw.Dockerfile
push: true
tags: ${{ steps.mw_meta.outputs.tags }}
labels: ${{ steps.mw_meta.outputs.labels }}
- name: Extract nginx Docker Metadata
id: ng_meta
uses: docker/metadata-action@v5
with:
images: |
registry.cn-shanghai.aliyuncs.com/prts/ng
ghcr.io/mooncellwiki/ng
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: .github/workflows/nginx.Dockerfile
push: true
tags: ${{ steps.ng_meta.outputs.tags }}
labels: ${{ steps.ng_meta.outputs.labels }}