Compare commits
No commits in common. "main" and "master" have entirely different histories.
12
.github/workflows/main.yml
vendored
12
.github/workflows/main.yml
vendored
@ -2,18 +2,14 @@ name: CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ master ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Starter Docker Test
|
||||||
name: Checkout
|
uses: cubetiq/starter-docker-actions@v1
|
||||||
uses: actions/checkout@v2
|
|
||||||
-
|
|
||||||
name: Starter Docker Action Test
|
|
||||||
uses: cubetiq/starter-docker-actions@main
|
|
||||||
with:
|
with:
|
||||||
run: docker version; pwd; ls; docker ps
|
run: docker version
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
.dccache
|
.DS_Store
|
@ -1,6 +1,6 @@
|
|||||||
FROM cubetiq/calpine-docker:latest
|
FROM docker:latest
|
||||||
|
|
||||||
RUN apk update
|
RUN apk add bash
|
||||||
|
|
||||||
COPY ./entrypoint.sh /entrypoint.sh
|
COPY ./entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Starter Docker
|
- name: Starter Docker
|
||||||
uses: CUBETIQ/starter-docker-actions@main
|
uses: CUBETIQ/starter-docker-actions@v1
|
||||||
```
|
```
|
||||||
|
|
||||||
# Example Action
|
# Example Action
|
||||||
@ -19,7 +19,7 @@ name: CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ master ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -27,7 +27,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Starter Docker Test
|
- name: Starter Docker Test
|
||||||
uses: cubetiq/starter-docker-actions@main
|
uses: cubetiq/starter-docker-actions@v1
|
||||||
with:
|
with:
|
||||||
shell: sh
|
shell: sh
|
||||||
run: docker version
|
run: docker version
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
#### Current working directory is: /github/workspace ####
|
|
||||||
WORKDIR=$(pwd)
|
|
||||||
echo "Working directory => $WORKDIR"
|
|
||||||
|
|
||||||
if [ ! -z $INPUT_USERNAME ];
|
if [ ! -z $INPUT_USERNAME ];
|
||||||
then echo $INPUT_PASSWORD | docker login $INPUT_REGISTRY -u $INPUT_USERNAME --password-stdin
|
then echo $INPUT_PASSWORD | docker login $INPUT_REGISTRY -u $INPUT_USERNAME --password-stdin
|
||||||
@ -15,15 +11,15 @@ then INPUT_OPTIONS="$INPUT_OPTIONS --network $INPUT_DOCKER_NETWORK"
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z $INPUT_SHELL ];
|
if [ -z $INPUT_SHELL ];
|
||||||
then INPUT_SHELL=/bin/sh
|
then INPUT_SHELL=sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z $INPUT_IMAGE ];
|
if [ -z $INPUT_IMAGE ];
|
||||||
then INPUT_IMAGE=cubetiq/calpine-docker
|
then INPUT_IMAGE=docker
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z $semicolon_delimited_script ];
|
if [ -z $semicolon_delimited_script ];
|
||||||
then semicolon_delimited_script="echo $(whoami)"
|
then semicolon_delimited_script="echo $(whoami)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec docker run --workdir $WORKDIR -v "$WORKDIR":"$WORKDIR" -v "/var/run/docker.sock":"/var/run/docker.sock" $INPUT_OPTIONS --entrypoint=$INPUT_SHELL $INPUT_IMAGE -c "`cat semicolon_delimited_script`"
|
exec docker run -v "/var/run/docker.sock":"/var/run/docker.sock" $INPUT_OPTIONS --entrypoint=$INPUT_SHELL $INPUT_IMAGE -c "`cat semicolon_delimited_script`"
|
Loading…
Reference in New Issue
Block a user