-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (33 loc) · 1.01 KB
/
ci.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
name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
publish-paimon-docker:
if: >-
(
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository
) || (
github.event_name == 'pull_request_target' &&
github.event.pull_request.head.repo.full_name != github.repository
) || (
github.event_name == 'push' &&
github.event.pull_request.head.repo.full_name == github.repository
)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get branch name
run: echo "branch_name=$(echo ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/*/}} | tr / -)" >> $GITHUB_ENV
- name: Build and push Paimon Docker image
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
registry: ghcr.io
tag_with_ref: true