Skip to content

Commit

Permalink
try a windows build for a laugh
Browse files Browse the repository at this point in the history
  • Loading branch information
tico24 committed Jul 12, 2023
1 parent 49e7292 commit 5130451
Showing 1 changed file with 48 additions and 35 deletions.
83 changes: 48 additions & 35 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,46 +85,59 @@ jobs:
--tag $image_name \
--tag quay.io/$image_name .
# build-windows:
# name: Build & push windows
# if: github.repository == 'pipekit/argo-workflows'
# runs-on: windows-2019
# steps:
# - uses: actions/checkout@v3
# - name: Docker Login
# uses: Azure/docker-login@v1
# with:
# username: ${{ secrets.DOCKERIO_USERNAME }}
# password: ${{ secrets.DOCKERIO_PASSWORD }}
build-windows:
name: Build & push windows
if: github.repository == 'argoproj/argo-workflows'
runs-on: windows-2022
steps:
- uses: actions/checkout@v3

# - name: Login to Quay
# uses: Azure/docker-login@v1
# with:
# login-server: quay.io
# username: ${{ secrets.QUAYIO_USERNAME }}
# password: ${{ secrets.QUAYIO_PASSWORD }}

# - name: Build & Push Windows Docker Images
# env:
# DOCKERIO_ORG: ${{ secrets.DOCKERIO_ORG }}
# run: |
# docker_org=$DOCKERIO_ORG
- name: Cache Docker layers
uses: actions/cache@v3
id: cache
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-windows-2022-argoexec-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-windows-2022-argoexec-buildx-
# tag=$(basename $GITHUB_REF)
# if [ $tag = "master" ]; then
# tag="latest"
# fi
- name: Docker Login
uses: Azure/docker-login@v1
with:
username: ${{ secrets.DOCKERIO_USERNAME }}
password: ${{ secrets.DOCKERIO_PASSWORD }}

# targets="argoexec"
# for target in $targets; do
# image_name="${docker_org}/${target}:${tag}-windows"
# docker build --target $target -t $image_name -f Dockerfile.windows .
# docker push $image_name
- name: Login to Quay
uses: Azure/docker-login@v1
with:
login-server: quay.io
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_PASSWORD }}

- name: Build & Push Windows Docker Images
env:
DOCKERIO_ORG: ${{ secrets.DOCKERIO_ORG }}
run: |
docker_org=$DOCKERIO_ORG
# docker tag $image_name quay.io/$image_name
# docker push quay.io/$image_name
tag=$(basename $GITHUB_REF)
if [ $tag = "master" ]; then
tag="latest"
fi
# done
targets="argoexec"
for target in $targets; do
image_name="${docker_org}/${target}:${tag}-windows"
docker buildx build \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--cache-to "type=local,dest=/tmp/.buildx-cache" \
--output "type=image,push=true" \
--target $TARGET \
--provenance=false \
--file Dockerfile.windows \
--tag $image_name \
--tag quay.io/$image_name .
done
push-images:
name: Push manifest with all images
Expand Down

0 comments on commit 5130451

Please sign in to comment.