Build Sass Images #137
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: Build Sass Images | |
on: | |
workflow_dispatch: | |
inputs: | |
is_test: | |
description: "Test run" | |
required: true | |
type: boolean | |
default: false | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
env: | |
repo: sass | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} | |
ALIYUN_USERNAME: ${{ secrets.ALIYUN_USERNAME }} | |
ALIYUN_PASSWORD: ${{ secrets.ALIYUN_PASSWORD }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/login | |
- name: Get version | |
uses: ikrong/[email protected] | |
with: | |
function: fetch | |
params: '["https://api.github.com/repos/sass/dart-sass/releases/latest","get",["tag_name"]]' | |
- name: Read repo and commit | |
run: | | |
NODE_PATH=$(npm root --quiet -g) node ./tools/prepare.js repo-revision sass/sass-site | |
- name: Build sass doc | |
if: ${{ !inputs.is_test }} | |
uses: docker/[email protected] | |
with: | |
platforms: linux/amd64,linux/arm64 | |
context: ./sass/ | |
push: true | |
tags: | | |
docworld/sass:latest | |
docworld/sass:${{ env.tag_name }} | |
registry.cn-beijing.aliyuncs.com/docworld/sass:latest | |
registry.cn-beijing.aliyuncs.com/docworld/sass:${{ env.tag_name }} | |
build-args: | | |
DOCWORLD_SOURCE=${{ env.DOCWORLD_SOURCE }} | |
- name: Test Build sass doc | |
if: ${{ inputs.is_test }} | |
uses: docker/[email protected] | |
with: | |
platforms: linux/amd64,linux/arm64 | |
context: ./sass/ | |
push: true | |
tags: | | |
registry.cn-beijing.aliyuncs.com/ikrong/docworld:sass | |
build-args: | | |
DOCWORLD_SOURCE=${{ env.DOCWORLD_SOURCE }} | |
UpdateDockerDescription: | |
if: ${{ !inputs.is_test }} | |
needs: [Build] | |
uses: ikrong/documents/.github/workflows/_updateDocker.yml@main | |
with: | |
repoName: sass | |
secrets: inherit |