initial test version

This commit is contained in:
Dagen Brock 2020-03-04 09:33:25 -06:00
commit afe8e00574
4 changed files with 87 additions and 0 deletions

29
Dockerfile Normal file
View File

@ -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 <dagenbrock@gmail.com>"
# Copy entrypoint
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

21
LICENSE Normal file
View File

@ -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.

18
README.md Normal file
View File

@ -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"
}
```

19
entrypoint.sh Normal file
View File

@ -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