-
Notifications
You must be signed in to change notification settings - Fork 36
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
Showing
6 changed files
with
104 additions
and
65 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,66 @@ | ||
name: Tinyphone Build | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
pull_request: | ||
types: | ||
- labeled | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tinyphone_win_job: | ||
if: github.event.label.name == 'ci/github' || github.event_name == 'workflow_dispatch' || github.event_name == 'release' | ||
name: Build Tinyphone Windows | ||
runs-on: windows-2016 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
# - name: Cache Docker layers | ||
# uses: actions/cache@v2 | ||
# with: | ||
# path: "C:\buildx-cache" | ||
# key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-buildx- | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} | ||
password: ${{ secrets.GH_TOKEN }} | ||
- name: Get Changed Files | ||
uses: jitterbit/get-changed-files@v1 | ||
id: changed_files | ||
with: | ||
format: 'space-delimited' | ||
- name: Set vars | ||
id: vars | ||
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | ||
- name: Build and Push tinyphone_base to registry | ||
if: contains(steps.changed_files.outputs.modified, 'Dockerfile.base') | ||
run: | | ||
docker build --file=./distribution/docker/Dockerfile.base -t ghcr.io/${{ github.repository_owner }}/tinyphone_base:latest -t ghcr.io/${{ github.repository_owner }}/tinyphone_base:${{ steps.vars.outputs.sha_short }} ./distribution/docker | ||
docker push ghcr.io/${{ github.repository_owner }}/tinyphone_base:latest | ||
docker push ghcr.io/${{ github.repository_owner }}/tinyphone_base:${{ steps.vars.outputs.sha_short }} | ||
- name: Build tinyphone | ||
run: | | ||
cat ./distribution/docker/release.ps1 | docker run -v ${PWD}:"C:\Code\tinyphone" -i ghcr.io/${{ github.repository_owner }}/tinyphone_base:latest | ||
# docker cp $(docker ps -a --last 1 -q):"C:\Code\tinyphone\tinyphone-installer\bin\Release\tinyphone_installer.msi" "tinyphone_installer.$(date +%s).msi" | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: tinyphone_installer | ||
path: | | ||
./tinyphone-installer/bin/Release/tinyphone_installer.msi | ||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
with: | ||
artifacts: "./tinyphone/Release/tinyphone.exe,tinyphone-installer/bin/Release/tinyphone_installer.msi" | ||
draft: true | ||
allowUpdates: true | ||
token: ${{ secrets.GH_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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,12 +1,11 @@ | ||
## Build Docker Image | ||
|
||
``` | ||
docker build -f Dockerfile.base -m 2G -t dotnet3.5-vs17:latest . | ||
docker build -f Dockerfile.build -m 2G -t tinyphone . | ||
docker build -f Dockerfile.base -m 2G -t tinyphone_base . | ||
``` | ||
|
||
## Run Docker | ||
## Run Docker Build | ||
|
||
``` | ||
./release.sh | ||
cat release.ps1 | docker run -v `pwd`:"C:\Code\tinyphone" -i tinyphone_base | ||
``` |
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
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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
docker build -m 2G -f Dockerfile.build -t tinyphone . | ||
docker build -m 8G -f distribution/docker/Dockerfile.base -t tinyphone_base ./distribution/docker | ||
#docker run -m 2G tinyphone:latest "C:\Build\release.ps1" | ||
cat release.ps1 | docker run -m 2G -i tinyphone | ||
cat release.ps1 | docker run -v `pwd`:"C:\Code\tinyphone" -i tinyphone_base | ||
|
||
docker cp $(docker ps -a --last 1 -q):"C:\Code\tinyphone\tinyphone-installer\bin\Release\tinyphone_installer.msi" "tinyphone_installer.$(date +%s).msi" | ||
|
||
docker rmi $(docker ps -a --last 1 -q) | ||
# docker cp $(docker ps -a --last 1 -q):"C:\Code\tinyphone\tinyphone-installer\bin\Release\tinyphone_installer.msi" "tinyphone_installer.$(date +%s).msi" | ||
# docker rmi $(docker ps -a --last 1 -q) |