Skip to content

0.3.0

0.3.0 #1

name: CI
on:
schedule:
- cron: '0 5 1 * *'
release:
types:
- published
jobs:
push_metasploit_images_to_registry:
environment: production
name: Push Metasploit Docker images to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Check out the Metasploit Framework repo
uses: actions/checkout@v4
with:
repository: rapid7/metasploit-framework
path: metasploit-framework
- name: Switch to the latest MSF tag
id: metasploit_setup
run: |
cd metasploit-framework
git fetch --tags
latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1))
latest_minor_tag=${latest_tag%.*}
latest_major_tag=${latest_minor_tag%.*}
echo "latest_tag=$latest_tag" >> $GITHUB_OUTPUT
echo "latest_minor_tag=$latest_minor_tag" >> $GITHUB_OUTPUT
echo "latest_major_tag=$latest_major_tag" >> $GITHUB_OUTPUT
git checkout $latest_tag
- name: Build and push Docker image for Metasploit Framework
uses: docker/build-push-action@v5
with:
context: ./metasploit-framework
push: true
platforms: linux/amd64,linux/arm64
tags: |
sadparad1se/metasploit-framework:${{ steps.metasploit_setup.outputs.latest_tag }}
sadparad1se/metasploit-framework:${{ steps.metasploit_setup.outputs.latest_minor_tag }}
sadparad1se/metasploit-framework:${{ steps.metasploit_setup.outputs.latest_major_tag }}
sadparad1se/metasploit-framework:latest
labels: |
msf-version=${{ steps.metasploit_setup.outputs.latest_tag }}
snek-sploit-commit=$GITHUB_SHA
- name: Check out the current repo
uses: actions/checkout@v4
- name: Build and push Docker image for MSF running RPC
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
sadparad1se/metasploit-framework:rpc-${{ steps.metasploit_setup.outputs.latest_tag }}
sadparad1se/metasploit-framework:rpc-${{ steps.metasploit_setup.outputs.latest_minor_tag }}
sadparad1se/metasploit-framework:rpc-${{ steps.metasploit_setup.outputs.latest_major_tag }}
sadparad1se/metasploit-framework:rpc
labels: |
msf-version=${{ steps.metasploit_setup.outputs.latest_tag }}
snek-sploit-commit=$GITHUB_SHA