Skip to content

Workflow file for this run

name: Push emasser to Docker Hub on every release
on:
release:
types: [published]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run string replace
uses: frabert/replace-string-action@master
id: format-tag
with:
pattern: 'v'
string: "${{ github.event.release.tag_name }}"
replace-with: ''
flags: 'g'
- name: Checkout the emasser Repository
uses: actions/checkout@v4
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
push: true
tags: mitre/emasser:release-latest,mitre/emasser:${{ steps.format-tag.outputs.replaced }}