Yaml: apply prettier (#3023)

This commit is contained in:
andig 2022-03-29 15:54:02 +02:00 • committed by GitHub
parent 7efe7c3436
commit cef008f9af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
272 changed files with 4387 additions and 4532 deletions

View file

@ -8,95 +8,94 @@ on:
workflow_call:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.18
id: go
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.18
id: go
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: "16"
- name: Cache Go modules
uses: actions/cache@v2
with:
path: |
~/go/pkg
~/.cache/go-build
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-${{ matrix.go-version }}-go-
- name: Cache Go modules
uses: actions/cache@v2
with:
path: |
~/go/pkg
~/.cache/go-build
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-${{ matrix.go-version }}-go-
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: gofmt
run: |
gofmt -w -l $(find . -name '*.go')
- name: gofmt
run: |
gofmt -w -l $(find . -name '*.go')
- name: Install tools
run: make install
- name: Install tools
run: make install
- name: Assets
run: make assets
- name: Assets
run: make assets
- name: Porcelain
run: |
go mod tidy
test -z "$(git status --porcelain)" || (git status; git diff; false)
- name: Porcelain
run: |
go mod tidy
test -z "$(git status --porcelain)" || (git status; git diff; false)
- name: Build
run: make build
- name: Build
run: make build
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
skip-pkg-cache: true
skip-build-cache: true
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
skip-pkg-cache: true
skip-build-cache: true
- name: Test
run: make test
- name: Test
run: make test
build-ui:
name: Build UI
runs-on: ubuntu-latest
steps:
- name: Cache NPM modules
uses: actions/cache@v2
with:
path: |
**/node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Cache NPM modules
uses: actions/cache@v2
with:
path: |
**/node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2
- name: Install tools
run: make install-ui
- name: Install tools
run: make install-ui
- name: Build
run: make ui
- name: Build
run: make ui
- name: Lint
run: make lint-ui
- name: Lint
run: make lint-ui
- name: Test
run: make test-ui
- name: Test
run: make test-ui
- name: Porcelain
run: |
test -z "$(git status --porcelain)" || (git status; git diff; false)
- name: Porcelain
run: |
test -z "$(git status --porcelain)" || (git status; git diff; false)

View file

@ -9,24 +9,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Clean git
run: |
git checkout go.*
rm -rf flags buildflags
- name: Clean git
run: |
git checkout go.*
rm -rf flags buildflags
- name: Deploy to docs repo
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GH_REPO }}
publish_dir: ./templates/docs
external_repository: evcc-io/docs
publish_branch: main
destination_dir: templates
allow_empty_commit: false
commit_message: Templates update
if: ${{ success() }}
- name: Deploy to docs repo
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GH_REPO }}
publish_dir: ./templates/docs
external_repository: evcc-io/docs
publish_branch: main
destination_dir: templates
allow_empty_commit: false
commit_message: Templates update
if: ${{ success() }}

View file

@ -2,7 +2,7 @@ name: Nightly Build
on:
schedule: # runs on the default branch: master
- cron: '0 2 * * *' # run at 2 AM UTC
- cron: "0 2 * * *" # run at 2 AM UTC
workflow_dispatch:
jobs:
@ -34,84 +34,83 @@ jobs:
docker:
name: Publish Docker :nightly
needs:
- call-build-workflow
- call-build-workflow
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install
env:
SEIHON_VERSION: v0.9.0
run: curl -sfL https://raw.githubusercontent.com/ldez/seihon/master/godownloader.sh | sudo bash -s -- -b $GOPATH/bin ${SEIHON_VERSION}
- name: Install
env:
SEIHON_VERSION: v0.9.0
run: curl -sfL https://raw.githubusercontent.com/ldez/seihon/master/godownloader.sh | sudo bash -s -- -b $GOPATH/bin ${SEIHON_VERSION}
- name: Login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Publish
run: make publish-nightly
- name: Login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Publish
run: make publish-nightly
apt:
name: Publish APT nightly
needs:
- call-build-workflow
- call-build-workflow
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache Go modules
uses: actions/cache@v2
with:
path: |
~/go/pkg
~/.cache/go-build
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-${{ matrix.go-version }}-go-
- name: Cache Go modules
uses: actions/cache@v2
with:
path: |
~/go/pkg
~/.cache/go-build
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-${{ matrix.go-version }}-go-
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.18
id: go
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.18
id: go
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: "16"
- name: Install Cloudsmith CLI
run: pip install --upgrade cloudsmith-cli
- name: Install Cloudsmith CLI
run: pip install --upgrade cloudsmith-cli
- name: Clean git
run: |
git checkout go.*
rm -rf flags buildflags
- name: Clean git
run: |
git checkout go.*
rm -rf flags buildflags
- name: Create nightly build
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: --snapshot -f .goreleaser-nightly.yml --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create nightly build
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: --snapshot -f .goreleaser-nightly.yml --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish .deb to Cloudsmith
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
run: |
for filename in release/*.deb; do
echo "Pushing $filename to 'unstable'"
cloudsmith push deb evcc/unstable/any-distro/any-version $filename
done
- name: Publish .deb to Cloudsmith
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
run: |
for filename in release/*.deb; do
echo "Pushing $filename to 'unstable'"
cloudsmith push deb evcc/unstable/any-distro/any-version $filename
done

View file

@ -13,12 +13,12 @@ jobs:
&& contains(github.event.comment.body, '/rebase')
&& (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER')
steps:
- name: Checkout the latest code
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Automatic Rebase
uses: cirrus-actions/rebase@1.5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout the latest code
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Automatic Rebase
uses: cirrus-actions/rebase@1.5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -3,7 +3,7 @@ name: Release
on:
push:
tags:
- '*'
- "*"
jobs:
call-build-workflow:
@ -13,99 +13,98 @@ jobs:
docker:
name: Publish Docker :release
needs:
- call-build-workflow
- call-build-workflow
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: refs/heads/master # force master
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v2
with:
ref: refs/heads/master # force master
fetch-depth: 0
- name: Install
env:
SEIHON_VERSION: v0.9.0
run: curl -sfL https://raw.githubusercontent.com/ldez/seihon/master/godownloader.sh | sudo bash -s -- -b $GOPATH/bin ${SEIHON_VERSION}
- name: Install
env:
SEIHON_VERSION: v0.9.0
run: curl -sfL https://raw.githubusercontent.com/ldez/seihon/master/godownloader.sh | sudo bash -s -- -b $GOPATH/bin ${SEIHON_VERSION}
- name: Login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Publish
run: make publish-release
- name: Login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Publish
run: make publish-release
apt:
name: Publish Github & APT release
needs:
- call-build-workflow
- call-build-workflow
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache Go modules
uses: actions/cache@v2
with:
path: |
~/go/pkg
~/.cache/go-build
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-${{ matrix.go-version }}-go-
- name: Cache Go modules
uses: actions/cache@v2
with:
path: |
~/go/pkg
~/.cache/go-build
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-${{ matrix.go-version }}-go-
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ^1.18
id: go
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ^1.18
id: go
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: "16"
- name: Install Cloudsmith CLI
run: pip install --upgrade cloudsmith-cli
- name: Install Cloudsmith CLI
run: pip install --upgrade cloudsmith-cli
# gokrazy image
# - name: Prepare Image
# run: |
# make prepare-image
# sed -i -e 's#-ld.*$#& -X github.com/evcc-io/evcc/server/updater.Password=${{ secrets.IMAGE_PASS }}#' buildflags/github.com/evcc-io/evcc/buildflags.txt
# mkdir /home/runner/.config/gokrazy
# echo ${{ secrets.IMAGE_PASS }}> /home/runner/.config/gokrazy/http-password.txt
# gokrazy image
# - name: Prepare Image
# run: |
# make prepare-image
# sed -i -e 's#-ld.*$#& -X github.com/evcc-io/evcc/server/updater.Password=${{ secrets.IMAGE_PASS }}#' buildflags/github.com/evcc-io/evcc/buildflags.txt
# mkdir /home/runner/.config/gokrazy
# echo ${{ secrets.IMAGE_PASS }}> /home/runner/.config/gokrazy/http-password.txt
# - name: Build Image
# run: make image
# - name: Build Image
# run: make image
# - name: Build Root Filesystem
# run: make image-rootfs
# - name: Build Root Filesystem
# run: make image-rootfs
- name: Clean git
run: |
git checkout go.*
rm -rf flags buildflags
- name: Clean git
run: |
git checkout go.*
rm -rf flags buildflags
- name: Create Github Release
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_REPO }}
- name: Create Github Release
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_REPO }}
- name: Publish .deb to Cloudsmith
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
run: |
for filename in release/*.deb; do
echo "Pushing $filename to 'stable'"
cloudsmith push deb evcc/stable/any-distro/any-version $filename
done
- name: Publish .deb to Cloudsmith
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
run: |
for filename in release/*.deb; do
echo "Pushing $filename to 'stable'"
cloudsmith push deb evcc/stable/any-distro/any-version $filename
done

View file

@ -3,22 +3,22 @@ name: Validate Schema
on:
push:
paths:
- "*.yaml"
- "*.json"
- "*.yaml"
- "*.json"
pull_request:
paths:
- "*.yaml"
- "*.json"
- "*.yaml"
- "*.json"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: nwisbeta/validate-yaml-schema@v1.0.3
with:
yamlSchemasJson: |
{
"./schema.json": ["evcc.dist.yaml"]
}
- uses: actions/checkout@v2
- uses: nwisbeta/validate-yaml-schema@v1.0.3
with:
yamlSchemasJson: |
{
"./schema.json": ["evcc.dist.yaml"]
}

View file

@ -1,8 +1,9 @@
name: 'Stale issue handler'
name: "Stale issue handler"
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
- cron: "0 0 * * *"
jobs:
stale:
@ -13,6 +14,6 @@ jobs:
with:
days-before-stale: 20
days-before-close: 5
exempt-issue-labels: 'blocked,must,should,keep,pinned'
exempt-issue-labels: "blocked,must,should,keep,pinned"
- name: Print outputs
run: echo ${{ join(steps.stale.outputs.*, ',') }}