-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c1f8041
commit 6ca9f3f
Showing
7 changed files
with
124 additions
and
0 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 @@ | ||
FROM ubuntu:18.04 | ||
|
||
LABEL "com.github.actions.name"="DocFX - Build and publish documentation" | ||
LABEL "com.github.actions.description"="Builds and publishes documentation to GitHub Pages." | ||
LABEL "com.github.actions.icon"="code" | ||
LABEL "com.github.actions.color"="red" | ||
|
||
LABEL "repository"="https://github.com/emiliano84/Toolkit.Docs" | ||
LABEL "homepage"="https://emiliano84.github.io/Toolkit.Docs/" | ||
LABEL "maintainer"="Emil <[email protected]>" | ||
|
||
ADD entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
ENTRYPOINT ["/entrypoint.sh"] |
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 @@ | ||
name: 'docfx' | ||
description: 'Build Docs With DocFx' | ||
# inputs: | ||
# token: # id of input | ||
# description: 'token' | ||
# required: true | ||
# outputs: | ||
# time: # id of output | ||
# description: 'The time we greeted you' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
# args: | ||
# - ${{ inputs.token }} |
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,19 @@ | ||
#!/bin/sh -l | ||
|
||
echo "Updating..." | ||
apt-get update | ||
apt-get install -y unzip wget gnupg gnupg2 gnupg1 | ||
|
||
# Install Mono | ||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | ||
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | tee /etc/apt/sources.list.d/mono-official-stable.list | ||
apt update | ||
apt install mono-complete --yes | ||
|
||
# Get DocFX | ||
wget https://github.com/dotnet/docfx/releases/download/v2.45/docfx.zip | ||
unzip docfx.zip -d _docfx | ||
# cd docs | ||
|
||
# Build docs | ||
mono _docfx/docfx.exe |
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,10 @@ | ||
# Container image that runs your code | ||
FROM alpine:3.10 | ||
|
||
# Copies your code file from your action repository to the filesystem path `/` of the container | ||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
RUN chmod +x /entrypoint.sh | ||
|
||
# Code file to execute when the docker container starts up (`entrypoint.sh`) | ||
ENTRYPOINT ["/entrypoint.sh"] |
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,16 @@ | ||
# action.yml | ||
name: 'Hello World' | ||
description: 'Greet someone and record the time' | ||
inputs: | ||
who-to-greet: # id of input | ||
description: 'Who to greet' | ||
required: true | ||
default: 'World' | ||
outputs: | ||
time: # id of output | ||
description: 'The time we greeted you' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.who-to-greet }} |
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,5 @@ | ||
#!/bin/sh -l | ||
|
||
echo "Hello $1" | ||
time=$(date) | ||
echo ::set-output name=time::$time |
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,46 @@ | ||
name: DocFx | ||
# This workflow is triggered on push to the repository. | ||
on: [push] | ||
|
||
jobs: | ||
build: | ||
# Job name is DocFx | ||
name: Clone Repos | ||
# This job runs on Linux | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout | ||
- uses: actions/checkout@v1 | ||
# with: | ||
# path: 'ToolkitDocs' | ||
|
||
# Clone | ||
- name: Clone | ||
run: git clone https://emiliano84:${{secrets.GITHUB_TOKEN}}@github.com/emiliano84/Toolkit.git ../Toolkit | ||
|
||
# Hello | ||
- name: Hello | ||
run: echo ${HOME} ${GITHUB_ACTOR} ${GITHUB_REPOSITORY} ${GITHUB_WORKSPACE} ${GITHUB_SHA} | ||
# ${{secrets.TOKEN}} ${{secrets.GITHUB_TOKEN}} | ||
|
||
# Ls | ||
- name: Ls | ||
run: ls | ||
|
||
# Ls ToolkitDocs | ||
- name: Ls /home/runner/work/Toolkit.Docs | ||
run: ls /home/runner/work/Toolkit.Docs | ||
|
||
hello_world_job: | ||
runs-on: ubuntu-latest | ||
name: A job to say hello | ||
steps: | ||
# - uses: ./ # Uses an action in the root directory | ||
- name: Hello world action step | ||
id: hello | ||
uses: emiliano84/Toolkit.Docs/.github/actions/hello-world@master | ||
with: | ||
who-to-greet: 'Mona the Octocat' | ||
# Use the output from the `hello` step | ||
- name: Get the output time | ||
run: echo "The time was ${{ steps.hello.outputs.time }}" |