Skip to content

Commit

Permalink
👷 Add GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ShellWen committed Nov 25, 2023
1 parent 3ea41a6 commit 825371d
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build
on:
workflow_dispatch:
push:
branches:
- master
jobs:
build:
concurrency:
group: build-global-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v3

- uses: benjlevesque/[email protected]
id: short-sha
with:
length: 7

- name: Login to Docker
uses: docker/login-action@v2
with:
registry: registry.ap-southeast-1.aliyuncs.com
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build docker image and push [ap-southeast-1]
uses: docker/build-push-action@v3
with:
push: true
context: .
tags: registry.ap-southeast-1.aliyuncs.com/kemono/maintenance:main-${{ env.SHA }}
file: Dockerfile

- name: Login to Docker
uses: docker/login-action@v2
with:
registry: registry.cn-shenzhen.aliyuncs.com
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build docker image and push [cn-shenzhen]
uses: docker/build-push-action@v3
with:
push: true
context: .
tags: registry.cn-shenzhen.aliyuncs.com/kemono/maintenance:main-${{ env.SHA }}
file: Dockerfile

0 comments on commit 825371d

Please sign in to comment.