-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (78 loc) · 2.53 KB
/
airflow-content-syncer-container.yaml
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
name: Airflow content syncer container
on:
push:
branches:
- "main"
paths:
- airflow-content-syncer/**
- .github/**
pull_request:
paths:
- airflow-content-syncer/**
- .github/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-airflow-content-syncer:
name: Build Airflow content syncer container
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
# This image is based on ubuntu:20.04
steps:
- uses: actions/checkout@v4
- uses: docker/metadata-action@v5
id: metadata
with:
images: ghcr.io/${{ github.repository }}/airflow-content-syncer
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha,format=long
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: int128/kaniko-action@v1
name: Create airflow-content-syncer container
with:
push: false
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
cache: false
cache-repository: ghcr.io/${{ github.repository }}/cache
context: airflow-content-syncer
publish-airflow-content-syncer:
name: Publish Airflow content syncer container
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
# This image is based on ubuntu:20.04
steps:
- uses: actions/checkout@v4
- uses: docker/metadata-action@v5
id: metadata
with:
images: ghcr.io/${{ github.repository }}/airflow-content-syncer
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha,format=long
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: int128/kaniko-action@v1
name: Create and publish airflow-content-syncer container
with:
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
cache: false
cache-repository: ghcr.io/${{ github.repository }}/cache
context: airflow-content-syncer