Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:ge-high-assurance/RACK
- Loading branch information
Showing
99 changed files
with
2,355 additions
and
921 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
|
||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
# Location of .github/workflows | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Builds rack-box docker image (reusable workflow) | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
push: | ||
required: false | ||
default: true | ||
type: boolean | ||
version: | ||
required: false | ||
default: 'dev' | ||
type: string | ||
|
||
jobs: | ||
|
||
# build-docker-image job: | ||
# - Builds rack-box docker image | ||
# - Pushes docker image to Docker Hub | ||
|
||
build-docker-image: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Check out RACK source | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ge-high-assurance/RACK | ||
path: RACK | ||
|
||
- name: Ask cache for rack-box files | ||
uses: actions/cache@v3 | ||
id: cache | ||
with: | ||
path: RACK/rack-box/files | ||
key: files-${{ github.sha }} | ||
|
||
- name: We don't have rack-box files? | ||
if: steps.cache.outputs.cache-hit == false | ||
run: | | ||
echo "::error rack-box files are missing" | ||
exit 1 | ||
- name: Build rack-box docker image | ||
run: | | ||
cd RACK/rack-box | ||
packer build -var version=${{ inputs.version }} rack-box-docker.json | ||
- name: Login to Docker Hub | ||
if: inputs.push == true | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Push rack-box docker image to Docker Hub | ||
if: inputs.push == true | ||
run: docker push gehighassurance/rack-box:${{ inputs.version }} | ||
|
||
- name: Update description of rack-box docker image | ||
if: inputs.push == true | ||
uses: peter-evans/dockerhub-description@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
repository: gehighassurance/rack-box | ||
readme-filepath: RACK/rack-box/Docker-Hub-README.md |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Builds rack-box virtual machine (reusable workflow) | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
required: false | ||
default: 'dev' | ||
type: string | ||
|
||
jobs: | ||
|
||
# build-virtual-machine job: | ||
# - Builds rack-box virtual machine | ||
# - Uploads virtual machine to workflow or release | ||
|
||
build-virtual-machine: | ||
runs-on: macos-12 | ||
|
||
steps: | ||
- name: Check out RACK source | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ge-high-assurance/RACK | ||
path: RACK | ||
|
||
- name: Ask cache for rack-box files | ||
uses: actions/cache@v3 | ||
id: cache | ||
with: | ||
path: RACK/rack-box/files | ||
key: files-${{ github.sha }} | ||
|
||
- name: We don't have rack-box files? | ||
if: steps.cache.outputs.cache-hit == false | ||
run: | | ||
echo "::error rack-box files are missing" | ||
exit 1 | ||
- name: Download base box for virtual machine | ||
run: | | ||
curl -LOSfs https://app.vagrantup.com/ubuntu/boxes/focal64/versions/20221115.1.0/providers/virtualbox.box | ||
mkdir -p RACK/rack-box/focal64 | ||
tar -xf virtualbox.box -C RACK/rack-box/focal64 | ||
rm -f virtualbox.box | ||
- name: Build rack-box virtual machine | ||
run: | | ||
cd RACK/rack-box | ||
packer build -var headless=true -var version=${{ inputs.version }} rack-box-virtualbox.json | ||
- name: Split rack-box virtual machine | ||
run: | | ||
cd RACK/rack-box | ||
mv output-virtualbox-ovf rack-box-${{ inputs.version }} | ||
zip -r rack-box-${{ inputs.version }}.zip rack-box-${{ inputs.version }} | ||
split -b 1500m rack-box-${{ inputs.version }}.zip rack-box-${{ inputs.version }}.zip | ||
rm rack-box-${{ inputs.version }}.zip | ||
- name: Upload split virtual machine to workflow | ||
uses: actions/upload-artifact@v3 | ||
if: github.event_name != 'release' | ||
with: | ||
name: rack-box-${{ inputs.version }} | ||
path: | | ||
RACK/rack-box/GitHub-Release-README.md | ||
RACK/rack-box/rack-box-${{ inputs.version }}.zip* | ||
# softprops/action-gh-release has many issues and PRs filed | ||
# against it; replace it with "gh release upload" if CI fails | ||
# run: gh release upload ${{ github.event.release.tag_name }} RACK/rack-box/GitHub-Release-README.md RACK/rack-box/rack-box-${{ inputs.version }}.zip* --clobber | ||
|
||
- name: Upload split virtual machine to release | ||
uses: softprops/action-gh-release@v1 | ||
if: github.event_name == 'release' | ||
with: | ||
files: | | ||
RACK/rack-box/GitHub-Release-README.md | ||
RACK/rack-box/rack-box-${{ inputs.version }}.zip* |
Oops, something went wrong.