Skip to content

AuthorizationMetricbeat Docker Image CI #83

AuthorizationMetricbeat Docker Image CI

AuthorizationMetricbeat Docker Image CI #83

name: AuthorizationMetricbeat Docker Image CI
on:
create:
push:
paths:
- 'AuthorizationMetricbeat/**'
- '.github/workflows/AuthorizationMetricbeat_docker_build_push.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Extract branch name
if: startsWith(github.ref , 'refs/heads/')
shell: bash
run: echo "docker_tag=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
- name: Extract tag name
if: startsWith(github.ref , 'refs/tags/')
shell: bash
run: echo "docker_tag=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
- name: Build and push
uses: docker/[email protected]
with:
context: ./AuthorizationMetricbeat
file: AuthorizationMetricbeat/Dockerfile
platforms: linux/amd64
push: true
tags: osirixfoundation/kheops-authorization-metricbeat:${{ env.docker_tag }}