-
Notifications
You must be signed in to change notification settings - Fork 63
36 lines (34 loc) · 1.15 KB
/
release-lite-to-docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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@v3
- 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: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Checkout the Heimdall Repository
uses: actions/checkout@v4
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.lite
push: true
platforms: 'linux/amd64'
tags: mitre/heimdall-lite:release-latest,mitre/heimdall-lite:${{ steps.format-tag.outputs.replaced }}