Skip to content

Commit

Permalink
Merge pull request #281 from steilerDev/dev
Browse files Browse the repository at this point in the history
stage for beta release
  • Loading branch information
Frank Steiler authored Jul 4, 2023
2 parents aaceee5 + b050158 commit bc460eb
Show file tree
Hide file tree
Showing 117 changed files with 29,135 additions and 6,330 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/issue-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Issue Template
about: General issue template for icloud-photos-sync
title: ''
labels: open
labels: new
assignees: ''

---
Expand All @@ -18,15 +18,15 @@ A clear and concise description of what the bug is.

**Error code**

Share the Error Code generated upon the crash
[Enable crash and error reporting](https://steilerdev.github.io/icloud-photos-sync/user-guides/error-reporting/) and share the Error Code generated upon the crash.

```
e.g. `10000000-0000-0000-0000-000000000000`
```

**Logs**

Please paste the log file (preferably with `LOG_LEVEL=debug`), located in `.icloud-photos-sync.log`, stored in the `DATA_DIR`.
Please paste the log file (with `LOG_LEVEL=debug`), located in `.icloud-photos-sync.log`, stored in the `DATA_DIR`.

```
.icloud-photos-sync.log
Expand Down
42 changes: 42 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## PR Checklist
Please check if your PR fulfills the following requirements:

- [ ] The commit message follows our guidelines: https://github.com/steilerDev/icloud-photos-sync/blob/main/CONTRIBUTING.md#commit
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)


## PR Type
What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->

- [ ] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:


## What is the current behavior?
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->

Issue Number: N/A


## What is the new behavior?


## Does this PR introduce a breaking change?

- [ ] Yes
- [ ] No


<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->


## Other information
22 changes: 22 additions & 0 deletions .github/actions/build/app-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: build-app-setup
description: Sets up the environment for the app build action
inputs:
app-path:
description: The path to the app directory
required: false
default: app
runs:
using: composite
steps:
- id: setup-node
uses: actions/setup-node@v3
with:
node-version-file: ${{ inputs.app-path }}/node-version
cache: npm
cache-dependency-path: ${{ inputs.app-path }}
- id: setup-npm
shell: bash
run: (cd ${{ inputs.app-path }}; npm ci)
- id: setup-fs
shell: bash
run: cp README.md LICENSE ${{ inputs.app-path }}/
27 changes: 27 additions & 0 deletions .github/actions/build/app/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: build-app
description: Builds the JS application and uploads the artifact
inputs:
app-path:
description: The path to the app directory
required: false
default: app
artifact-name:
description: The name of the uploaded app artifact
required: false
default: app-artifact
runs:
using: composite
steps:
- id: build-app
shell: bash
run: (cd ${{ inputs.app-path }}; npm run build)
- id: package-artifact
shell: bash
run: |
fileName=$(cd ${{ inputs.app-path }}; npm pack)
mv ${{ inputs.app-path }}/$fileName npm-pack.tgz
- id: upload-artifact
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifact-name }}
path: npm-pack.tgz
26 changes: 26 additions & 0 deletions .github/actions/build/docker-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: build-docker-setup
description: Sets up the environment for cross platform docker build action
inputs:
docker-path:
description: The path to the docker directory
required: false
default: docker
app-artifact-name:
description: The name of the uploaded app artifact
required: false
default: app-artifact
runs:
using: composite
steps:
- id: setup-qemu
uses: docker/setup-qemu-action@v2
- id: setup-buildx
uses: docker/setup-buildx-action@v2
- id: setup-app-artifact
uses: actions/download-artifact@v3
with:
name: ${{ inputs.app-artifact-name }}
path: ${{ inputs.docker-path }}/rootfs/opt/
- id: debug
shell: bash
run: ls -al ${{ inputs.docker-path }}/rootfs/opt/
45 changes: 45 additions & 0 deletions .github/actions/build/docker/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: build-docker
description: Builds the cross platform docker containers and uploads the artifact
inputs:
docker-path:
description: The path to the docker directory
required: false
default: docker
artifact-name:
description: The name of the uploaded docker artifact
required: false
default: docker-artifact
runs:
using: composite
steps:
- id: get-docker-metadata
uses: ./.github/actions/helper/docker-metadata
- id: build-rootfs
shell: bash
run: tar -C ${{ inputs.docker-path }}/rootfs -czf ${{ inputs.docker-path }}/rootfs.tar.gz ./
- id: build-docker-amd64
uses: docker/build-push-action@v4
with:
context: ${{ inputs.docker-path }}
platforms: linux/amd64
tags: ${{ steps.get-docker-metadata.outputs.image-namespace }}/${{ steps.get-docker-metadata.outputs.image-repository }}:${{ steps.get-docker-metadata.outputs.image-tag }}
outputs: type=docker,dest=docker-amd64.tar
- id: build-docker-arm64
uses: docker/build-push-action@v4
with:
context: ${{ inputs.docker-path }}
platforms: linux/arm64
tags: ${{ steps.get-docker-metadata.outputs.image-namespace }}/${{ steps.get-docker-metadata.outputs.image-repository }}:${{ steps.get-docker-metadata.outputs.image-tag }}
outputs: type=docker,dest=docker-arm64.tar
- id: package-artifact
shell: bash
run: |
mkdir docker-artifact
gzip docker-*.tar
mv docker-*.tar.gz docker-artifact/
echo "artifact-path=docker-artifact/" >> $GITHUB_OUTPUT
- name: upload-artifact
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifact-name }}
path: ${{ steps.package-artifact.outputs.artifact-path }}
41 changes: 41 additions & 0 deletions .github/actions/build/docs-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: build-docs-setup
description: Sets up the environment for the docs build action using mkdocs
inputs:
docs-path:
description: The path to the mkdocs directory
required: false
default: docs
app-path:
description: The path to the app directory
required: false
default: app
app-artifact-name:
description: The name of the uploaded app artifact
required: false
default: app-artifact
runs:
using: composite
steps:
- id: setup-python
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: pip
cache-dependency-path: ${{ inputs.docs-path }}
- id: setup-pip
shell: bash
run: pip install -r ${{ inputs.docs-path }}/requirements.txt
- id: setup-node
uses: actions/setup-node@v3
with:
node-version-file: ${{ inputs.app-path }}/node-version
- id: download-app-artifact
uses: actions/download-artifact@v3
with:
name: ${{ inputs.app-artifact-name }}
path: ${{ inputs.app-path }}
- id: install-app-artifact
shell: bash
run: |
tree -a ${{ inputs.app-path }}
npm install -g ./${{ inputs.app-path }}/npm-pack.tgz
45 changes: 45 additions & 0 deletions .github/actions/build/docs/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: build-docs
description: Builds the docs using mkdocs
inputs:
docs-path:
description: The path to the docs directory
required: false
default: docs
app-path:
description: The path to the app directory
required: false
default: app
runs:
using: composite
steps:
- id: get-docs-config
shell: bash
run: |
echo "site-dir=$(grep -oP "site_dir: '\K.+'" ${{ inputs.docs-path }}/mkdocs.yml | head -c-2)" >> $GITHUB_OUTPUT
echo "docs-dir=$(grep -oP "docs_dir: '\K.+'" ${{ inputs.docs-path }}/mkdocs.yml | head -c-2)" >> $GITHUB_OUTPUT
- id: get-npm-metadata
uses: ./.github/actions/helper/npm-metadata
with:
package: ${{ inputs.app-path }}/package.json
- id: setup-fs
shell: bash
run: cp README.md LICENSE ${{ inputs.docs-path }}/${{ steps.get-docs-config.outputs.docs-dir }}/
- id: build-cli-reference
shell: bash
run: ${{ github.action_path }}/build_cli.sh "${{ inputs.docs-path }}/${{ steps.get-docs-config.outputs.docs-dir }}" "${{ steps.get-npm-metadata.outputs.command }}"
- id: build-mkdocs
shell: bash
run: (cd ${{ inputs.docs-path }}; mkdocs build)
- id: bundle-coverage
uses: dawidd6/action-download-artifact@v2
with:
name: coverage-artifact
path: ${{ inputs.docs-path }}/${{ steps.get-docs-config.outputs.site-dir }}/dev/coverage
workflow: event_pr.yml
workflow_conclusion: ""
branch: beta
if_no_artifact_found: warn
- id: upload-artifact
uses: actions/upload-pages-artifact@v1
with:
path: ${{ inputs.docs-path }}/${{ steps.get-docs-config.outputs.site-dir }}
38 changes: 38 additions & 0 deletions .github/actions/build/docs/build_cli.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

OUT_FILE="$1/user-guides/cli.md"
BIN="$2"
> $OUT_FILE

echo '# CLI Reference' >> $OUT_FILE
echo '' >> $OUT_FILE
echo '```' >> $OUT_FILE
$BIN --help >> $OUT_FILE
echo '```' >> $OUT_FILE
echo '' >> $OUT_FILE

echo '## `token` command' >> $OUT_FILE
echo '' >> $OUT_FILE
echo '```' >> $OUT_FILE
$BIN token --help >> $OUT_FILE
echo '```' >> $OUT_FILE
echo '' >> $OUT_FILE

echo '## `sync` command' >> $OUT_FILE
echo '' >> $OUT_FILE
echo '```' >> $OUT_FILE
$BIN sync --help >> $OUT_FILE
echo '```' >> $OUT_FILE
echo '' >> $OUT_FILE

echo '## `archive` command' >> $OUT_FILE
echo '' >> $OUT_FILE
echo '```' >> $OUT_FILE
$BIN archive --help >> $OUT_FILE
echo '```' >> $OUT_FILE

echo '## `daemon` command' >> $OUT_FILE
echo '' >> $OUT_FILE
echo '```' >> $OUT_FILE
$BIN daemon --help >> $OUT_FILE
echo '```' >> $OUT_FILE
22 changes: 22 additions & 0 deletions .github/actions/build/wiki-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: build-wiki-setup
description: Sets up the environment for the wiki build action
inputs:
app-path:
description: The path to the app directory
required: false
default: app
runs:
using: composite
steps:
- id: setup-node
uses: actions/setup-node@v3
with:
node-version-file: ${{ inputs.app-path }}/node-version
cache: npm
cache-dependency-path: ${{ inputs.app-path }}
- id: setup-npm
shell: bash
run: (cd ${{ inputs.app-path }}; npm ci)
- id: setup-fs
shell: bash
run: cp README.md LICENSE ${{ inputs.app-path }}/
27 changes: 27 additions & 0 deletions .github/actions/build/wiki/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: build-wiki
description: Builds the Github Wiki Pages and uploads the artifact
inputs:
app-path:
description: The path to the app directory
required: false
default: app
artifact-name:
description: The name of the uploaded wiki artifact
required: false
default: wiki-artifact
runs:
using: composite
steps:
- id: build-typedoc
shell: bash
run: (cd ${{ inputs.app-path }}; npm run typedoc)
- id: package-artifact
shell: bash
run: |
outDir=$(cat ${{ inputs.app-path }}/typedoc.json | jq -r .out)
echo "artifact-path=${{ inputs.app-path }}/$outDir" >> $GITHUB_OUTPUT
- name: upload-artifact
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifact-name }}
path: ${{ steps.package-artifact.outputs.artifact-path }}
Loading

0 comments on commit bc460eb

Please sign in to comment.