Skip to content
name: Push Heimdall Lite to docker on every release and tag as release-latest and version
on:
release:
types: [published]
jobs:
docker:
runs-on: ubuntu-22.04
steps:
- name: Run string replace # remove the v from the version number before using it in the docker tag
uses: frabert/replace-string-action@v2
id: format-tag
with:
pattern: 'v'
string: '${{ github.event.release.tag_name }}'
replace-with: ''
flags: 'g'
- name: Checkout the Heimdall Repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.lite
push: true
platforms: linux/amd64
tags: mitre/heimdall-lite:release-latest,mitre/heimdall-lite:${{ steps.format-tag.outputs.replaced }}