Skip to content

Commit

Permalink
Run workflows in Mono Docker containers
Browse files Browse the repository at this point in the history
  • Loading branch information
DasSkelett committed Jun 28, 2020
1 parent 03b4cff commit 90b0480
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 32 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,14 @@ jobs:
mono: ['5.20', '6.4', '6.6', '6.8']
configuration: [Debug, Release]

container:
image: mono:${{ matrix.mono }}

steps:
- uses: actions/checkout@v2

- name: Install Mono
run: |
sudo apt-get remove mono-complete --auto-remove --purge -y
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic/snapshots/${{ matrix.mono }} main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt-get update
sudo apt-get install -y gnupg ca-certificates
sudo apt-get install -y mono-complete
- name: Install runtime dependencies
run: sudo apt-get install -y libcurl4-openssl-dev xvfb
run: apt-get update && apt-get install -y libcurl4-openssl-dev xvfb
- name: Restore cache for _build/lib/nuget
uses: actions/cache@v1
with:
Expand All @@ -52,7 +47,7 @@ jobs:
WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }}
HOOK_OS_NAME: ${{ runner.os }}
WORKFLOW_NAME: ${{ github.workflow }}
if: ${{ env.DISCORD_WEBHOOK && failure() }}
if: ${{ env.WEBHOOK_URL && failure() }}
run: |
git clone https://github.com/DiscordHooks/github-actions-discord-webhook.git webhook
bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL
Expand Down Expand Up @@ -97,7 +92,7 @@ jobs:
WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }}
HOOK_OS_NAME: ${{ runner.os }}
WORKFLOW_NAME: ${{ github.workflow }}
if: ${{ env.DISCORD_WEBHOOK && failure() }}
if: ${{ env.WEBHOOK_URL && failure() }}
run: |
git clone --depth 1 https://github.com/DiscordHooks/github-actions-discord-webhook.git webhook
bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL
15 changes: 5 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,14 @@ jobs:
deploy:
runs-on: ubuntu-latest

container:
image: mono:${{ env.RELEASE_MONO_VERSION }}

steps:
- uses: actions/checkout@v2

- name: Installing Mono
run: |
sudo apt-get remove -y mono-complete --auto-remove --purge
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic/snapshots/$RELEASE_MONO_VERSION main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt-get update
sudo apt-get install -y gnupg ca-certificates
sudo apt-get install -y mono-complete
- name: Installing runtime dependencies
run: sudo apt-get install -y libcurl4-openssl-dev xvfb
run: apt-get update && apt-get install -y libcurl4-openssl-dev xvfb
- name: Restore cache for _build/lib/nuget
uses: actions/cache@v1
with:
Expand Down Expand Up @@ -70,7 +65,7 @@ jobs:
WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }}
HOOK_OS_NAME: ${{ runner.os }}
WORKFLOW_NAME: ${{ github.workflow }}
if: ${{ env.DISCORD_WEBHOOK }}
if: ${{ env.WEBHOOK_URL }}
run: |
git clone --depth 1 https://github.com/DiscordHooks/github-actions-discord-webhook.git webhook
bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL
17 changes: 6 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,16 @@ jobs:
release:
runs-on: ubuntu-latest

container:
image: mono:${{ env.RELEASE_MONO_VERSION }}

steps:
- uses: actions/checkout@v2

- name: Installing Mono
run: |
sudo apt-get remove -y mono-complete --auto-remove --purge
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic/snapshots/$RELEASE_MONO_VERSION main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt-get update
sudo apt-get install -y gnupg ca-certificates
sudo apt-get install -y mono-complete
- name: Installing build dependencies
run: sudo apt-get install -y git make sed libplist-utils xorriso gzip fakeroot lintian rpm
run: apt-get update && apt-get install -y git make sed libplist-utils xorriso gzip fakeroot lintian rpm
- name: Installing runtime dependencies
run: sudo apt-get install -y libcurl4-openssl-dev xvfb
run: apt-get install -y libcurl4-openssl-dev xvfb

- name: Build dmg
run: ./build osx --configuration=Release
Expand Down Expand Up @@ -93,7 +88,7 @@ jobs:
WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }}
HOOK_OS_NAME: ${{ runner.os }}
WORKFLOW_NAME: ${{ github.workflow }}
if: ${{ env.DISCORD_WEBHOOK }}]
if: ${{ env.WEBHOOK_URL }}]
run: |
git clone --depth 1 https://github.com/DiscordHooks/github-actions-discord-webhook.git webhook
bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL

0 comments on commit 90b0480

Please sign in to comment.