Skip to content

Commit

Permalink
Merge branch 'master' into dev-branch (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
rusko124 authored Aug 16, 2024
1 parent a02cc12 commit 669fe7e
Show file tree
Hide file tree
Showing 11 changed files with 1,424 additions and 192 deletions.
87 changes: 87 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---

name: Docs

on:
pull_request:
push:
branches:
- master

jobs:
check_files_changed:
runs-on: ubuntu-latest
# Required permissions
permissions:
contents: 'read'
pull-requests: 'read'
outputs:
readme: ${{ steps.filter.outputs.readme }}
docs_command_line_help: ${{ steps.filter.outputs.docs_command_line_help }}
docs_edge_apps: ${{ steps.filter.outputs.docs_edge_apps }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
list-files: shell
filters: |
readme:
- modified: 'README.md'
docs_command_line_help:
- modified: 'docs/CommandLineHelp.md'
docs_edge_apps:
- modified: 'docs/EdgeApps.md'
docs-help-md:
permissions:
contents: write
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
target: x86_64-unknown-linux-gnu

- name: Generate documentation
run: cargo run -- print-help-markdown > /tmp/CommandLineHelp.md

- name: Compare documentation
run: |
diff_output=$(diff /tmp/CommandLineHelp.md docs/CommandLineHelp.md || true)
if [ -n "$diff_output" ]; then
echo "$diff_output"
echo "::error::Documentation is out of date. Please run 'cargo run -- print-help-markdown > docs/CommandLineHelp.md' and commit the changes."
exit 1
else
echo "Documentation is up to date."
fi
trigger-developer-portal-deploy:
if: (github.event_name == 'push') &&
(github.ref == 'refs/heads/master') &&
(
(needs.check_files_changed.outputs.readme == 'true') ||
(needs.check_files_changed.outputs.docs_command_line_help == 'true') ||
(needs.check_files_changed.outputs.docs_edge_apps == 'true')
)
runs-on: ubuntu-latest
needs:
- check_files_changed
- docs-help-md
steps:
- name: Trigger Developer Portal deploy workflow
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.DEVELOPER_PORTAL_REPO_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-d '{"event_type": "deploy"}' \
https://api.github.com/repos/Screenly/developer-portal/dispatches
16 changes: 11 additions & 5 deletions .github/workflows/sbom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,26 @@ on:
- master
paths:
- 'Cargo.lock'
- 'Cargo.toml'

jobs:
sbom:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: psastras/sbom-rs/actions/install-cargo-sbom@cargo-sbom-latest
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'

- name: Install sbom4rust
run: |
pip install git+https://github.com/anthonyharrison/sbom4rust.git
- name: Run cargo-sbom
- name: Run sbom4rust
run: |
cargo-sbom --output-format=spdx_json_2_3 > sbom.spdx.json
cargo-sbom --output-format=cyclone_dx_json_1_4 > sbom.cyclonedx.json
sbom4rust -a screenly-cli --sbom spdx --format json -o sbom.spdx.json
sbom4rust -a screenly-cli --sbom cyclonedx --format json -o sbom.cyclonedx.json
- name: Upload SPDX SBOM
uses: actions/upload-artifact@v3
Expand Down
96 changes: 53 additions & 43 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 13 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cli"
version = "0.2.7"
name = "screenly"
version = "0.2.8"
edition = "2021"

[[bin]]
Expand All @@ -12,40 +12,41 @@ path = "src/main.rs"
[dependencies]
anyhow = "1.0.65"
clap = { version = "4.0.17", features = ["derive", "cargo"] }
clap-markdown = "0.1.4"
dirs = "4.0.0"
futures = "0.3.28"
glob = "0.3.1"
hex = "0.4.3"
http-auth-basic = "0.3.3"
indicatif = "0.17.2"
log = { version = "0.4.17", features = ["release_max_level_info", "max_level_debug"] }
openssl = { version = '0.10', features = ["vendored"] }
prettytable-rs = "0.10.0"
protobuf = "3.3.0"
rayon = "1.7.0"
regex = "1.9.3"
reqwest = { version = "0.11.12", features = ["json", "blocking", "multipart"] }
rpassword = "7.2.0"
sentry = "0.31.5"
sentry-anyhow = "0.31.5"
serde = { version = "1.0.147", features = ["derive"] }
serde_json = "1.0.87"
serde_with = "3.8.3"
serde_yaml = "0.9.17"
sha1 = "0.10.5"
sha2 = "0.10.7"
simple_logger = { version = "4.0.0", features= ["colors"]}
strum = "0.25"
strum_macros = "0.25"
temp-env = "0.3.6"
term = "0.7.0"
thiserror = "1.0.37"
sentry = "0.31.5"
sentry-anyhow = "0.31.5"
rayon = "1.7.0"
warp = "0.3.5"
tokio = "1.32.0"
tokio-stream = "0.1.14"
regex = "1.9.3"
walkdir = "2.3.3"
glob = "0.3.1"
futures = "0.3.28"
serde_with = "3.8.3"
temp-env = "0.3.6"
warp = "0.3.5"

[dev-dependencies]
httpmock = "0.6"
envtestkit = "1.1.2"
httpmock = "0.6"
tempfile = "3.8"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM alpine:3 as builder

WORKDIR /usr/src/screenly-cli
RUN apk add --no-cache wget tar
ARG RELEASE=v0.2.7
ARG RELEASE=v0.2.8
RUN wget "https://github.com/Screenly/cli/releases/download/$RELEASE/screenly-cli-x86_64-unknown-linux-musl.tar.gz"
RUN tar xfz screenly-cli-x86_64-unknown-linux-musl.tar.gz

Expand Down
Loading

0 comments on commit 669fe7e

Please sign in to comment.