Skip to content

Release Sygma OTEL Collector - by @eedygreen #115

Release Sygma OTEL Collector - by @eedygreen

Release Sygma OTEL Collector - by @eedygreen #115

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()