Skip to content

messed with environment variables for release #7

messed with environment variables for release

messed with environment variables for release #7

Workflow file for this run

name: Publish Docker image to GitHub Packages
on:
push:
tags:
- '*.*-collector-*.*.*-release'
jobs:
build-and-push:
name: Build Docker image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: extract release names from release_name.sh
id: release_name
run: |
./release_name.sh ${{ github.ref }} >> $GITHUB_OUTPUT
- name: debug output for release names
run: |
echo "Collector version: ${{ steps.release_name.outputs.COLLECTOR_VERSION }}"
echo "Builder version: ${{ steps.release_name.outputs.BUILDER_VERSION }}"
- name: Generate Docker metadata
id: docker_metatdata
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=${{ steps.release_name.outputs.BUILDER_VERSION }}-${{ steps.release_name.outputs.COLLECTOR_VERSION }}
type=raw,value=${{ steps.release_name.outputs.BUILDER_VERSION }}-latest
type=raw,value=latest
- name: setup Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Run mapping generator
run: go run cmd/mappinggenerator/*.go -v=${{ steps.release_name.outputs.COLLECTOR_VERSION }}
- name: Build config generator
run: go build -o docker-build/ocbconfigbuilder cmd/configgenerator/*.go
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v5
with:
context: docker-build
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.docker_metatdata.outputs.tags }}
labels: ${{ steps.docker_metatdata.outputs.labels }}
push: true