-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docker build in github action.
- Loading branch information
Showing
1 changed file
with
46 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,46 @@ | ||
name: Build on Windows | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- release/* | ||
pull_request: | ||
branches: | ||
- main | ||
- release/* | ||
|
||
jobs: | ||
docker: | ||
name: Docker build win2004 | ||
runs-on: [self-hosted, windows, x64, win2004] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Build Docker image | ||
working-directory: . | ||
shell: pwsh | ||
run: | | ||
docker build ` | ||
--file dockerfile/directx/win10.dockerfile ` | ||
--label org.opencontainers.image.source=${{ github.event.repository.html_url }} ` | ||
--label org.opencontainers.image.created=${{ github.event.repository.pushed_at }} ` | ||
--label org.opencontainers.image.revision=${{ github.sha }} ` | ||
--platform windows/amd64 ` | ||
--isolation=process ` | ||
--tag $env:TAG . | ||
env: | ||
TAG: superbench/main:win2004 | ||
- name: Push Docker image | ||
if: ${{ github.event_name != 'pull_request' }} | ||
shell: pwsh | ||
run: | | ||
docker login -u $env:USER -p $env:PASS | ||
docker push $env:TAG | ||
docker logout | ||
env: | ||
TAG: superbench/main:win2004 | ||
USER: ${{ secrets.DOCKERHUB_USERNAME }} | ||
PASS: ${{ secrets.DOCKERHUB_TOKEN }} |