forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (66 loc) · 2.29 KB
/
tracegen.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
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
name: tracegen
on:
push:
branches: [ main ]
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build-dev:
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Build tracegen
uses: docker/build-push-action@v3
with:
context: cmd/tracegen
push: false
tags: ghcr.io/open-telemetry/opentelemetry-collector-contrib/tracegen:dev
publish-latest:
runs-on: ubuntu-latest
if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && github.repository == 'open-telemetry/opentelemetry-collector-contrib'
permissions:
packages: write
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push tracegen to Github packages
uses: docker/build-push-action@v3
with:
context: cmd/tracegen
push: true
tags: ghcr.io/open-telemetry/opentelemetry-collector-contrib/tracegen:latest
publish-stable:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'open-telemetry/opentelemetry-collector-contrib'
permissions:
packages: write
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Set Release Tag
id: github_tag
run: ./.github/workflows/scripts/set_release_tag.sh
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push tracegen to Github packages
run: |
docker build cmd/tracegen -t ghcr.io/open-telemetry/opentelemetry-collector-contrib/tracegen:$RELEASE_TAG
docker push ghcr.io/open-telemetry/opentelemetry-collector-contrib/tracegen:$RELEASE_TAG
env:
RELEASE_TAG: ${{ steps.github_tag.outputs.tag }}