v7.10 #636
Workflow file for this run
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
name: Windows | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
release: | |
types: [published] | |
workflow_dispatch: | |
permissions: | |
contents: none | |
concurrency: | |
# Skip intermediate builds: always. | |
# Cancel intermediate builds: only if it is a pull request build. | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
jobs: | |
windows: | |
timeout-minutes: 10 | |
needs: build_windows | |
if: always() | |
runs-on: windows-latest | |
steps: | |
- run: | | |
echo build_windows: ${{ needs.build_windows.result }} | |
- run: exit 1 | |
if: needs.build_windows.result != 'success' | |
build_windows: | |
timeout-minutes: 60 | |
name: build_windows / ${{ matrix.image }}-windows-${{ matrix.arch }} | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- image: 'package' | |
arch: 'x86_64' | |
- image: 'package' | |
arch: 'i686' | |
steps: | |
- uses: actions/checkout@v2 | |
# Set up `IMAGE_NAME`, which is something like `juliapackaging/package_win64` | |
# and also `TAG_NAME`, which is usually something like `v5.23`, but if we're | |
# not on a tag, it defaults to the gitsha of the current build. That build | |
# won't be pushed, because we only push on tags, but we need to define this | |
# for our actual `docker build` step below. | |
- run: | | |
if ( "${{ github.ref_name }}" -Like "v*" ) { | |
Write-Output "TAG_NAME=${{ github.ref_name }}" >> $env:GITHUB_ENV | |
} else { | |
Write-Output "TAG_NAME=${{ github.sha }}" >> $env:GITHUB_ENV | |
} | |
Write-Output "IMAGE_NAME=juliapackaging/${{ matrix.image }}-windows-${{ matrix.arch }}" >> $env:GITHUB_ENV | |
- run: docker build -t ${{ env.IMAGE_NAME }}:${{ env.TAG_NAME }} . | |
working-directory: windows/${{ matrix.image }}-${{ matrix.arch }} | |
- run: docker tag ${{ env.IMAGE_NAME }}:${{ env.TAG_NAME }} ${{ env.IMAGE_NAME }}:latest | |
# Dump some debugging output to ensure everything works properly | |
- run: docker images ${{ env.IMAGE_NAME }} --digests | |
- run: docker run ${{ env.IMAGE_NAME }} bash -c "cc -dumpmachine; cc --version" | |
- run: docker run ${{ env.IMAGE_NAME }} bash -c "MSYS2_ARG_CONV_EXCL='*' signtool /?" | |
- run: docker run ${{ env.IMAGE_NAME }} bash -c "aws --version" | |
# Login to docker hub so we can push it up, but only do so on a tag | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
if: ${{ github.event_name == 'release' }} | |
- run: | | |
docker push ${{ env.IMAGE_NAME }}:${{ env.TAG_NAME }} | |
docker push ${{ env.IMAGE_NAME }}:latest | |
if: ${{ github.event_name == 'release' }} |