Create FUNDING.yml #65
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: Push Docker Image | |
on: | |
push: | |
tags: | |
- "v*" | |
branches: | |
- "master" | |
paths-ignore: | |
- "*.md" | |
- ".*" | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Log in to the GHCR | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOC_USER }} | |
password: ${{ secrets.DOC_PAT }} | |
- name: Log in to the AliyunCS | |
uses: docker/login-action@v2 | |
with: | |
registry: registry.cn-shanghai.aliyuncs.com | |
username: ${{ secrets.ALI_USER }} | |
password: ${{ secrets.ALI_PAT }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Set up image name | |
run: | | |
GHRC_IMAGE_NAME=$(echo "ghcr.io/${{ github.repository_owner }}/status-page" | tr '[:upper:]' '[:lower:]') | |
DOC_IMAGE_NAME=$(echo "nangle/status-page" | tr '[:upper:]' '[:lower:]') | |
if [ ${{ github.repository_owner }} = "xOS" ] | |
then ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/dns/status-page") | |
else ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/${{ github.repository_owner }}/status-page" | tr '[:upper:]' '[:lower:]') | |
fi | |
echo "::set-output name=GHRC_IMAGE_NAME::$GHRC_IMAGE_NAME" | |
echo "::set-output name=ALI_IMAGE_NAME::$ALI_IMAGE_NAME" | |
echo "::set-output name=DOC_IMAGE_NAME::$DOC_IMAGE_NAME" | |
id: image-name | |
- name: Build dasbboard image And Push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: | | |
${{ steps.image-name.outputs.ALI_IMAGE_NAME }} | |
${{ steps.image-name.outputs.DOC_IMAGE_NAME }} | |
${{ steps.image-name.outputs.GHRC_IMAGE_NAME }} |