Skip to content

Commit

Permalink
Merge branch 'philosowaffle:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
schrek06 authored Feb 3, 2024
2 parents 3bf7d79 + f7e7516 commit 77b9b69
Show file tree
Hide file tree
Showing 2,551 changed files with 175,351 additions and 4,688 deletions.
94 changes: 94 additions & 0 deletions .github/actions/publish-docker-images/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: 'Publish Docker Images'
description: 'Publishes the Docker Images'
inputs:
dockerfile:
description: 'Dockerfile to build'
required: true
tag:
description: 'The Tag for the Docker image'
required: true
version_tag:
description: 'Specific version tag'
required: false
major_version_tag:
description: 'Major version tag'
required: false
secret_docker_username:
description: "Docker username"
required: true
secret_docker_password:
description: "Docker password"
required: true
secret_github_package:
description: "Github Package Secret"
required: true
runs:
using: "composite"
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ inputs.secret_docker_username }}
password: ${{ inputs.secret_docker_password }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ inputs.secret_github_package }}

- name: Prepare env
run: |
echo "BUILD_VERSION=${GITHUB_RUN_NUMBER}-${GITHUB_RUN_ID}" >> $GITHUB_ENV
shell: bash

- name: Build & Push Tag to Package Repositories
if: inputs.version_tag == ''
id: docker_build_1
uses: docker/build-push-action@v3
with:
push: true
file: ./docker/${{ inputs.dockerfile }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
build-args: VERSION=${{ env.BUILD_VERSION }}
tags: |
${{ inputs.secret_docker_username }}/peloton-to-garmin:${{ inputs.tag }}
ghcr.io/${{ github.repository_owner }}/peloton-to-garmin:${{ inputs.tag }}
- name: Image digest
if: inputs.version_tag == ''
run: echo ${{ steps.docker_build_1.outputs.digest }}
shell: bash

- name: Build & Push Version Tags to Package Repositories
if: inputs.version_tag != ''
id: docker_build_2
uses: docker/build-push-action@v3
with:
push: true
file: ./docker/${{ inputs.dockerfile }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
build-args: VERSION=${{ env.BUILD_VERSION }}
tags: |
${{ inputs.secret_docker_username }}/peloton-to-garmin:${{ inputs.tag }}
${{ inputs.secret_docker_username }}/peloton-to-garmin:${{ inputs.version_tag }}
${{ inputs.secret_docker_username }}/peloton-to-garmin:${{ inputs.major_version_tag }}
ghcr.io/${{ github.repository_owner }}/peloton-to-garmin:${{ inputs.tag }}
ghcr.io/${{ github.repository_owner }}/peloton-to-garmin:${{ inputs.version_tag }}
ghcr.io/${{ github.repository_owner }}/peloton-to-garmin:${{ inputs.major_version_tag }}
- name: Image digest
if: inputs.version_tag != ''
run: echo ${{ steps.docker_build_2.outputs.digest }}
shell: bash
63 changes: 63 additions & 0 deletions .github/actions/publish-ui-dist/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: 'Publish UI Distribution'
description: 'Publishes the UI Distribution'
inputs:
dotnet-version:
description: 'Version of dotnet to install'
required: true
framework:
description: 'DotNet Framework'
required: true
os:
description: 'The OS we are running on'
required: true
outputs:
artifact:
description: 'Path to the published artifact'
value: ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework }}/${{ inputs.os }}
runs:
using: "composite"
steps:
- name: Setup .NET Core SDK ${{ inputs.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ inputs.dotnet-version }}

- name: List MAUI Workloads
run: dotnet workload list
shell: pwsh

- name: Prepare env
run: |
echo "BUILD_VERSION=$Env:GITHUB_RUN_NUMBER-$Env:GITHUB_RUN_ID" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
echo "RUNNER_TOOL_CACHE=$Env:RUNNER_TOOL_CACHE" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
shell: pwsh

- name: Publish ${{ inputs.os }}
run: dotnet publish ${{ github.workspace }}/src/ClientUI/ClientUI.csproj -c Release -f ${{ inputs.framework }} -p:RuntimeIdentifierOverride=${{ inputs.os }} -p:PublishSingleFile=true -p:SelfContained=true
shell: pwsh

- name: Rename Config
run: Rename-Item ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework }}/${{ inputs.os }}/configuration.example.json -NewName configuration.local.json
shell: pwsh

- name: Remove nested Publish Dir
run: Remove-Item ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework }}/${{ inputs.os }}/publish -Recurse
shell: pwsh

# Create Build Artifact
- name: Upload Artifact ui_${{ inputs.os }}_${{ env.BUILD_VERSION }}
uses: actions/upload-artifact@v3
with:
name: ui_${{ inputs.os }}_${{ env.BUILD_VERSION }}
path: ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework }}/${{ inputs.os }}


# Installed Workload Id Manifest Version Installation Source
# ---------------------------------------------------------------------
# maui-android 7.0.92/7.0.100 VS 17.7.34031.279
# android 33.0.68/7.0.100 VS 17.7.34031.279
# ios 16.4.7098/7.0.100 VS 17.7.34031.279
# maui-ios 7.0.92/7.0.100 VS 17.7.34031.279
# maui-windows 7.0.92/7.0.100 VS 17.7.34031.279
# maui-maccatalyst 7.0.92/7.0.100 VS 17.7.34031.279
# maccatalyst 16.4.7098/7.0.100 VS 17.7.34031.279
73 changes: 0 additions & 73 deletions .github/workflows/docker_latest.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/jekyll-gh-pages.yml

This file was deleted.

Loading

0 comments on commit 77b9b69

Please sign in to comment.