From afe8e00574f4d1d9731e1c0319175b4bea520c65 Mon Sep 17 00:00:00 2001 From: Dagen Brock Date: Wed, 4 Mar 2020 09:33:25 -0600 Subject: [PATCH] initial test version --- Dockerfile | 29 +++++++++++++++++++++++++++++ LICENSE | 21 +++++++++++++++++++++ README.md | 18 ++++++++++++++++++ entrypoint.sh | 19 +++++++++++++++++++ 4 files changed, 87 insertions(+) create mode 100644 Dockerfile create mode 100644 LICENSE create mode 100644 README.md create mode 100644 entrypoint.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..684c01a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +FROM ubuntu:18.04 + + +# Update +RUN apt-get update + + +# Install packages +#RUN apt-get -yq install rsync openssh-client +RUN apt-get -yq install unzip curl python3 + + + +# Label +LABEL "com.github.actions.name"="Cadius" +LABEL "com.github.actions.description"="For creating and manipulating ProDOS disk images." +LABEL "com.github.actions.icon"="target" +LABEL "com.github.actions.color"="blue" + +LABEL "version"="0.0.0" +LABEL "repository"="http://github.com/digarok/cadius-action" +LABEL "homepage"="https://github.com/digarok/cadius-action" +LABEL "maintainer"="Dagen Brock " + + +# Copy entrypoint +ADD entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1388220 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Dagen Brock + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..90493f5 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# cadius-action +A Github Action for installing Cadius and allowing you to manipulate ProDOS disk images with it. + + +# Example usage +``` +workflow "All pushes" { + on = "push" + resolves = ["Make a Disk"] +} + +action "Make a Disk" { + uses = "digarok/cadius-action@master" + run = "cadius createvolume exampledsk.po exampledsk 140KB" +} +``` + + diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..a64b2d4 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +CADZIP=https://github.com/digarok/cadius/releases/download/0.0.0/cadius-ubuntu-latest-0.0.0.zip + +curl -L $CADZIP -o cadius.zip +unzip -n cadius.zip +mv cadius /usr/bin + +if [ "$INPUT_INCLUDE_PRODOS" = "true" ]; then + echo "Grabbing ProDOS 2.4.2" + curl -k -L https://mirrors.apple2.org.za/ftp.apple.asimov.net/images/masters/prodos/ProDOS_2_4_2.dsk -o ProDOS_2_4_2.dsk + echo "Convert DSK to PO" + curl -k -L https://raw.githubusercontent.com/digarok/dsk2po/master/dsk2po.py -o dsk2po.py + /usr/bin/python3 dsk2po.py ProDOS_2_4_2.dsk + cadius extractvolume ProDOS_2_4_2.po . + echo "ProDOS 2.4.2 files available in ./PRODOS.2.4.2/ :" + ls ./PRODOS.2.4.2/ +fi +ls