-
Notifications
You must be signed in to change notification settings - Fork 7
86 lines (74 loc) · 2.37 KB
/
Copy pathci-dev-pipeline.yaml
File metadata and controls
86 lines (74 loc) · 2.37 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: CI-dev-pipeline
on:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'
env:
TEST_TAG: target/impeller:beta
TEST_GCLOUD_TAG: target/impeller:beta-gcloud
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v5
- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051
with:
images: target/impeller
flavor: |
latest=false
prefix=beta
suffix=
- name: Build and export to Docker
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83
with:
context: .
file: ./Dockerfile
load: true
tags: ${{ env.TEST_TAG }}
- name: Build and push Docker image
if: github.event_name != 'pull_request'
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ env.TEST_TAG }}
labels: ${{ steps.meta.outputs.labels }}
- name: Extract metadata (tags, labels) for Docker with gcloud
id: meta-g
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051
with:
images: target/impeller
flavor: |
latest=false
prefix=beta
suffix=gcloud
- name: Build and export to Docker with gcloud
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83
with:
context: .
file: ./Dockerfile-gcloud
load: true
tags: ${{ env.TEST_GCLOUD_TAG }}
- name: Build and push Docker image with gcloud
if: github.event_name != 'pull_request'
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83
with:
context: .
file: ./Dockerfile-gcloud
push: true
tags: ${{ steps.meta-g.outputs.tags }}
labels: ${{ steps.meta-g.outputs.labels }}