forked from temporalio/temporal
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 1.53 KB
/
build-and-publish.yml
File metadata and controls
62 lines (54 loc) · 1.53 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Build and Publish
on:
push:
branches:
- main
- cloud/*
- feature/*
- release/*
permissions:
contents: read
jobs:
build-and-push-docker:
runs-on: ubuntu-latest
# Only push for main, cloud, release branches (not feature)
if: |
github.ref == 'refs/heads/main' ||
startsWith(github.ref, 'refs/heads/cloud/') ||
startsWith(github.ref, 'refs/heads/release/')
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Build binaries
uses: ./.github/actions/build-binaries
with:
snapshot: true
- name: Build and push Docker images
uses: ./.github/actions/build-docker-images
with:
push: true
tag-latest: ${{ github.ref == 'refs/heads/main' }}
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
# For feature branches, just build (no push)
build-docker-feature:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/heads/feature/')
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Build binaries
uses: ./.github/actions/build-binaries
with:
snapshot: true
- name: Build Docker images
uses: ./.github/actions/build-docker-images
with:
push: false
tag-latest: false