-
Notifications
You must be signed in to change notification settings - Fork 21
44 lines (40 loc) · 1.59 KB
/
build-push-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Build and push website image
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel.
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to Aliyun Container Registry
uses: docker/login-action@v3
with:
registry: registry.cn-shanghai.aliyuncs.com
username: ${{ secrets.ALIYUN_USERNAME }}
password: ${{ secrets.ALIYUN_PASSWORD }}
- name: Docker build and push
id: docker_build
uses: docker/build-push-action@v5
with:
file: Dockerfile
push: true
tags: registry.cn-shanghai.aliyuncs.com/bytebase/website
build-args: |
SITE_URL=${{ secrets.SITE_URL }}
ALGOLIA_WEBHOOK_SECRET=${{ secrets.ALGOLIA_WEBHOOK_SECRET }}
ALGOLIA_ADMIN_API_KEY=${{ secrets.ALGOLIA_ADMIN_API_KEY }}
ALGOLIA_INDEX_NAME=${{ secrets.ALGOLIA_INDEX_NAME }}
ALGOLIA_SEARCH_KEY=${{ secrets.ALGOLIA_SEARCH_KEY }}
ALGOLIA_APP_ID=${{ secrets.ALGOLIA_APP_ID }}
MAILCHIMP_API_KEY=${{ secrets.MAILCHIMP_API_KEY }}
MAILCHIMP_AUDIENCE_ID=${{ secrets.MAILCHIMP_AUDIENCE_ID }}
MAILCHIMP_API_SERVER=${{ secrets.MAILCHIMP_API_SERVER }}
- name: Image digest
run: echo "Successfully pushed bytebase/website" ${{ steps.docker_build.outputs.digest }}