Skip to content

Only allow webpki-roots to allow license CDLA-Permissive-2.0 #72

Only allow webpki-roots to allow license CDLA-Permissive-2.0

Only allow webpki-roots to allow license CDLA-Permissive-2.0 #72

Workflow file for this run

# πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
# Copyright 2021-2025 Noel Towa <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Release
on:
push:
tags:
- 'v?[0-9]+.[0-9]+.[0-9]'
permissions:
packages: write
contents: write
jobs:
binary:
name: "Rust / Build (${{matrix.runner}}: ${{matrix.target}})"
runs-on: ${{matrix.runner}}
strategy:
fail-fast: true
matrix:
include:
- runner: ubuntu-24.04
rustflags: "-Ctarget-cpu=native -Clink-arg=-fuse-ld=mold"
target: x86_64-unknown-linux-gnu
flags: "--all-features"
ext: ''
- runner: macos-13
target: x86_64-apple-darwin
rustflags: "-Ctarget-cpu=native"
flags: "--features os-notifier"
ext: ''
- runner: macos-latest
target: aarch64-apple-darwin
rustflags: "-Ctarget-cpu=native"
flags: "--features os-notifier"
ext: ''
- runner: windows-latest
target: x86_64-pc-windows-msvc
rustflags: "-Ctarget-cpu=native"
flags: "--features os-notifier"
ext: ''
steps:
- uses: actions/checkout@v4
- uses: auguwu/git-tag-action@master
id: tag
- run: rm rust-toolchain.toml
- uses: dtolnay/rust-toolchain@stable
with:
target: ${{matrix.target}}
- name: "Windows: Setup Vcpkg"
if: matrix.runner == 'windows-latest'
run: .ci/windows/Setup-Vcpkg.ps1
- name: "Windows: Cache Vcpkg"
if: matrix.runner == 'windows-latest'
uses: actions/cache@v4
with:
key: vcpkg-cache
path: ${{env.VCPKG_ROOT}}
- name: "Windows: Install Libraries"
if: matrix.runner == 'windows-latest'
run: .ci/windows/Install-Libraries.ps1
- name: "Windows: Setup NASM for BoringSSL via `aws-lc-sys`"
uses: ilammy/setup-nasm@v1
if: matrix.runner == 'windows-latest'
- if: matrix.runner == 'ubuntu-24.04'
uses: rui314/setup-mold@v1
- name: Build!
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
powershell .ci/windows/Release.ps1 -BuildFlags "${{matrix.flags}}"
elif [ "$RUNNER_OS" == "Linux" ]; then
BUILDFLAGS="${{matrix.flags}} --target=${{matrix.target}}" \
RUSTFLAGS="${{matrix.rustflags}}" \
BUILDTARGET="${{matrix.target}}" \
.ci/linux/release
else
BUILDFLAGS="${{matrix.flags}} --target=${{matrix.target}}" \
RUSTFLAGS="${{matrix.rustflags}}" \
BUILDTARGET="${{matrix.target}}" \
.ci/macos/release
fi
- uses: softprops/action-gh-release@v2
with:
files: ./.result/ume-*
- name: "S3 :: Upload (${{steps.tag.outputs.version}})"
uses: Noelware/[email protected]
with:
enforce-path-access-style: true
access-key-id: ${{secrets.S3_ACCESS_KEY}}
path-format: $(prefix)/ume/${{steps.tag.outputs.version}}/$(file)
directories: .result
secret-key: ${{secrets.S3_SECRET_KEY}}
endpoint: ${{secrets.S3_ENDPOINT}}
prefix: /noel/artifacts
region: us-east-1
bucket: august
- name: "S3 :: Upload (latest)"
uses: Noelware/[email protected]
with:
enforce-path-access-style: true
access-key-id: ${{secrets.S3_ACCESS_KEY}}
path-format: $(prefix)/ume/latest/$(file)
directories: .result
secret-key: ${{secrets.S3_SECRET_KEY}}
endpoint: ${{secrets.S3_ENDPOINT}}
prefix: /artifacts
region: us-east-1
bucket: august
nix-build:
name: Nix Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v16
with:
name: noel
authToken: ${{secrets.CACHIX_AUTH_TOKEN}}
- run: nix build .#ume
docker:
name: Build / Docker Image [${{matrix.dockerfile}}]
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
dockerfile:
- debian
- alpine
include:
- dockerfile: debian
suffix: ""
updateDescription: true
- dockerfile: alpine
suffix: "-alpine"
updateDescription: false
steps:
- uses: actions/checkout@v4
- uses: auguwu/git-tag-action@master
id: tag
- id: commit-hash
run: echo "commit=$(git rev-parse --short=8 $GITHUB_SHA)" >> $GITHUB_OUTPUT
- uses: docker/login-action@v3
with:
username: auguwu
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.repository_owner}}
password: ${{secrets.GH_TOKEN}}
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v6
with:
provenance: true
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=auguwu/ume:buildcache
cache-to: type=registry,ref=auguwu/ume:buildcache,mode=max
context: .
file: ./distribution/docker/${{matrix.dockerfile}}.Dockerfile
push: true
sbom: true
tags: |
ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}${{matrix.suffix}},
ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}${{matrix.suffix}},
ghcr.io/auguwu/ume:${{steps.tag.outputs.version}}${{matrix.suffix}},
ghcr.io/auguwu/ume:${{matrix.dockerfile == 'alpine' && 'alpine' || 'latest' }}
auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}${{matrix.suffix}},
auguwu/ume:${{steps.tag.outputs.major}}${{matrix.suffix}},
auguwu/ume:${{steps.tag.outputs.version}}${{matrix.suffix}},
auguwu/ume:${{matrix.dockerfile == 'alpine' && 'alpine' || 'latest' }}
labels: |
org.opencontainers.image.title=ume
org.opencontainers.image.description="πŸ»β€β„οΈπŸ’ Easy, self-hostable, and flexible image host made in Rust"
org.opencontainers.image.version=${{steps.tag.outputs.version}}
org.opencontainers.image.revision=${{steps.commit-hash.outputs.commit}}
org.opencontainers.image.licenses=Apache-2.0
org.opencontainers.image.documentation=https://floofy.dev/oss/ume
org.opencontainers.image.source=https://github.com/auguwu/ume/tree/${{steps.commit-hash.outputs.commit}}
- uses: peter-evans/dockerhub-description@v4
if: matrix.updateDescription
with:
username: auguwu
password: ${{secrets.DOCKER_PASSWORD}}
repository: auguwu/ume
readme-filepath: ./distribution/docker/README.md