-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (52 loc) · 1.61 KB
/
opentelemetry.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
name: OpenTelemetry
on:
release:
types:
- published
push:
run-name: Release Sygma OTEL Collector - ${{ inputs.release_tag }} by @${{ github.actor }}
env:
REGISTRY: 'ghcr.io'
TAG: 'latest'
jobs:
push:
name: publish image
runs-on: ubuntu-latest
environment: prod
permissions:
contents: read
id-token: write
packages: write
steps:
- name: Authorised User only
run: |
if [[ ! " eedygreen mpetrunic MakMuftic akchainsafe " =~ " ${{ github.actor }} " ]]; then
echo "You are not authorized to release!"
exit 1
fi
- name: checkout the source code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: login to ghcr
id: ghcr
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build / tag / push docker image into ghcr
id: build-and-push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.TAG }},${{ env.REGISTRY }}/${{ github.repository }}:${{ github.ref_name }}
# - name: slack notify
# uses: 8398a7/action-slack@v3
# with:
# status: ${{ job.status }}
# fields: repo,message,commit,author,action,job,eventName,ref,workflow
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
# if: always()