Merge pull request #5 from Dup4/feat-support-typst #26
Workflow file for this run
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
# yaml-language-server: $schema=https://json-schema.org/draft-07/schema# | |
name: Release | |
on: | |
push: | |
tags: | |
- "v*" | |
env: | |
GO_VERSION: "1.20" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Add hertz_client tag | |
uses: tvdias/[email protected] | |
with: | |
repo-token: "${{ github.token }}" | |
tag: "hertz_client/${{ github.ref_name }}" | |
- name: Set node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- run: npx changelogithub | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
release-docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set Tag | |
run: | | |
tag="${{ github.ref_name }}" | |
echo "${tag}" | |
prefix="v" | |
tag=${tag#"${prefix}"} | |
echo "DOCKER_TAG=${tag}" >> $GITHUB_ENV | |
- name: Set up QEMU | |
id: qemu | |
uses: docker/setup-qemu-action@v3 | |
with: | |
image: tonistiigi/binfmt:latest | |
platforms: all | |
- name: Available platforms | |
run: echo ${{ steps.qemu.outputs.platforms }} | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Inspect builder | |
run: | | |
echo "Name: ${{ steps.buildx.outputs.name }}" | |
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}" | |
echo "Status: ${{ steps.buildx.outputs.status }}" | |
echo "Flags: ${{ steps.buildx.outputs.flags }}" | |
echo "Platforms: ${{ steps.buildx.outputs.platforms }}" | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to ALiYun Shanghai Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: registry.cn-shanghai.aliyuncs.com | |
username: ${{ secrets.ALIYUN_REGISTRY_USERNAME }} | |
password: ${{ secrets.ALIYUN_REGISTRY_TOKEN }} | |
- id: github_repo_owner_string | |
uses: ASzc/change-string-case-action@v5 | |
with: | |
string: ${{ github.repository_owner }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./ | |
file: ./docker/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
docker.io/${{ secrets.DOCKERHUB_USERNAME }}/domprinter:${{ env.DOCKER_TAG }} | |
ghcr.io/${{ steps.github_repo_owner_string.outputs.lowercase }}/domprinter:${{ env.DOCKER_TAG }} | |
registry.cn-shanghai.aliyuncs.com/dup4/domprinter:${{ env.DOCKER_TAG }} |