Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish splunk-otel-js Docker image to ghcr.io | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
publish-image: | |
runs-on: ubuntu-20.04 | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- uses: actions/[email protected] | |
- uses: docker/setup-buildx-action@v2 | |
- name: Put GITHUB_REF_NAME into env | |
run: echo GITHUB_REF_NAME=${GITHUB_REF_NAME} >> $GITHUB_ENV | |
- name: Set the major version number | |
run: echo MAJOR_VERSION=${GITHUB_REF_NAME} | sed -e 's/\..*//' >> $GITHUB_ENV | |
- name: Login to GitHub Container Registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: build and publish container | |
uses: docker/[email protected] | |
with: | |
push: true | |
file: Dockerfile | |
platforms: linux/amd64,linux/arm64,linux/ppc64le | |
build-args: | | |
RELEASE_VER=${{ env.GITHUB_REF_NAME }} | |
tags: | | |
ghcr.io/signalfx/splunk-otel-js/splunk-otel-js:latest | |
ghcr.io/signalfx/splunk-otel-js/splunk-otel-js:${{ env.MAJOR_VERSION }} | |
ghcr.io/signalfx/splunk-otel-js/splunk-otel-js:${{ env.GITHUB_REF_NAME }} | |