Skip to content

added platform option to mfs build #14

added platform option to mfs build

added platform option to mfs build #14

name: Build and Push rapid7/metasploit-framework to burso/metasploit-framework
on:
push:
branches:
- main # Change to your default branch if not main
pull_request:
branches:
- main # Change to your default branch if not main
jobs:
build-and-push:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
platform:
- linux/amd64
- linux/arm/v6
- linux/arm/v7
- linux/arm64
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Clone Metasploit Framework repository
run: git clone https://github.com/rapid7/metasploit-framework.git
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: ./metasploit-framework # Dockerfile should be in the root of this repo or modify the context accordingly
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/metasploit-framework:latest # Change the tag as needed
- name: Logout from Docker Hub
run: docker logout