Revive aarch64 image #17
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: Verify | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions | |
permissions: | |
actions: none | |
checks: none | |
contents: read | |
deployments: none | |
id-token: none | |
issues: none | |
discussions: none | |
packages: none | |
pages: none | |
pull-requests: none | |
repository-projects: none | |
security-events: none | |
statuses: none | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 180 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
# From: 'ls ./docker/' | |
image_name: | |
- centos6-x64 | |
- debian-aarch64 | |
- debian-armv7 | |
- fedora30-x64 | |
# Currently fails on rate limiting on Kali's side: | |
# - kali109-x64 | |
- ubuntu1204-x64 | |
- ubuntu1204-x86 | |
- ubuntu1804-x64 | |
name: ${{ matrix.os }} - ${{ matrix.image_name }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set the docker build metadata | |
run: | | |
export BUILD_DATE=$(date "+%Y_%m") | |
echo "BUILD_DATE=$BUILD_DATE" >> "$GITHUB_ENV" | |
echo "BUILD_TAG=rapid7/${IMAGE_NAME}-omnibus:${BUILD_DATE}" >> "$GITHUB_ENV" | |
env: | |
IMAGE_NAME: ${{ matrix.image_name }} | |
- name: Build Docker image | |
run: | | |
/bin/bash -x -c "docker build --tag ${BUILD_TAG} -f ./docker/${IMAGE_NAME}/Dockerfile ./docker/${IMAGE_NAME}" | |
env: | |
IMAGE_NAME: ${{ matrix.image_name }} | |
# Checkout again - but with the submodules enabled to start a real build | |
- name: Checkout submodules | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Run omnibus | |
run: | | |
cat <<EOF >>build_docker.sh | |
#!/bin/bash --login | |
# install omnibus' dependencies | |
bundle install | |
bundle binstubs --all | |
# build the metasploit-framework package | |
bin/omnibus build metasploit-framework | |
EOF | |
chmod +x ./build_docker.sh | |
/bin/bash -x -c "docker run --rm --volume $(pwd):$(pwd) --workdir $(pwd) --user jenkins ${BUILD_TAG} /bin/bash -l -c './build_docker.sh'" |