Skip to content

Commit

Permalink
Merge #3091 Run workflows in Mono Docker containers
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Jun 28, 2020
2 parents 03b4cff + 90b0480 commit 04a3e0b
Show file tree
Hide file tree
Showing 4 changed files with 18 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ All notable changes to this project will be documented in this file.
- [Multiple] Don't fallback to Curl on 404, allow smaller GUI (#3084 by: HebaruSan; reviewed: DasSkelett)
- [Build] Move Travis CI to GitHub Workflows (#3085 by: DasSkelett; reviewed: techman83)
- [Build] Don't run workflow steps that require secrets on forks (#3089 by: DasSkelett; reviewed: HebaruSan)
- [Build] Run workflows in Mono Docker containers (#3091 by: DasSkelett; reviewed: HebaruSan)

## v1.27.2 (Chandrasekhar)

Expand Down

0 comments on commit 04a3e0b

Please sign in to comment.