Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P2G - V4 #425

Merged
merged 20 commits into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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 }}/dist/${{ inputs.os }}-ui
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
Loading