Sha256: 5162fe710468b2c02bff2155cf782533e1afcdb20dba0ef32b7971708aedd2fa

Contents?: true

Size: 1.08 KB

Versions: 1

Compression:

Stored size: 1.08 KB

Contents

name: Docker

on:
  push:
    tags:
      - "v*"

permissions:
  contents: read
  packages: write

env:
  DOCKER_REPO: ghcr.io/discourse/prometheus_exporter

jobs:
  build-and-publish:
    runs-on: ubuntu-latest
    timeout-minutes: 30

    steps:
      - name: Set vars
        id: vars
        run: |
          echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

      - uses: actions/checkout@v3
      - uses: docker/setup-qemu-action@v2
      - uses: docker/setup-buildx-action@v2

      - name: Login to Github Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Build and push images
        uses: docker/build-push-action@v3
        with:
          context: .
          push: true
          platforms: linux/amd64,linux/arm64
          build-args: |
            GEM_VERSION=${{ steps.vars.outputs.version }}
          tags: |
            ${{ env.DOCKER_REPO }}:${{ steps.vars.outputs.version }}
            ${{ env.DOCKER_REPO }}:latest

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
prometheus_exporter-2.0.8 .github/workflows/docker.yml