Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Run string replace # remove the v from the version number before using it in the docker tag | |
uses: frabert/replace-string-action@master | |
id: format-tag | |
with: | |
pattern: 'v' | |
string: '${{ github.event.release.tag_name }}' | |
replace-with: '' | |
flags: 'g' | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Checkout the Heimdall Repository | |
uses: actions/checkout@v3 | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: Dockerfile.lite | |
push: true | |
platforms: 'linux/amd64' | |
tags: mitre/heimdall-lite:release-latest,mitre/heimdall-lite:${{ steps.format-tag.outputs.replaced }} |