Skip to content

Merge pull request #1 from mesosphere/mh/bump-exporter #1

Merge pull request #1 from mesosphere/mh/bump-exporter

Merge pull request #1 from mesosphere/mh/bump-exporter #1

Workflow file for this run

name: Docker
on:
push:
branches:
- main
tags:
- "[0-9].[0-9]+.[0-9]+*"
# pull_request:
env:
PLATFORMS: linux/amd64
jobs:
docker:
name: Docker
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.ref }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Determine tag or commit
uses: haya14busa/action-cond@v1
id: refortag
with:
cond: ${{ startsWith(github.ref, 'refs/tags/') }}
if_true: ${{ github.ref }}
if_false: latest
- name: Determine image tag
id: imagetag
run: echo "value=${TAG_OR_BRANCH##*/}" >> $GITHUB_OUTPUT
env:
TAG_OR_BRANCH: ${{ steps.refortag.outputs.value }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build jmx-exporter
uses: docker/build-push-action@v2
with:
tags: ghcr.io/mesosphere/jmx-javaagent:${{ steps.imagetag.outputs.value }}
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: true
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache