Skip to content

Commit

Permalink
Merge pull request #1 from microsoft/dws/initial_open_sourcing
Browse files Browse the repository at this point in the history
Open sourcing of helm2oci
  • Loading branch information
dsteeley authored Sep 3, 2024
2 parents fe9a84e + ba37ff9 commit 13062b3
Show file tree
Hide file tree
Showing 11 changed files with 2,689 additions and 39 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "cargo" # See documentation for possible values
directory: "." # Location of package manifests
schedule:
interval: "weekly"
81 changes: 81 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: CI

on: [push, pull_request]

jobs:
check:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/cbl-mariner/base/core:2.0
steps:
- name: Install dependencies
run: unset HOME; tdnf install -y build-essential git openssl-devel ca-certificates
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Check format
run: cargo fmt -- --check
- name: Run cargo check
run: cargo check --locked
- name: Run cargo clippy
run: cargo clippy -- -D warnings

test:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/cbl-mariner/base/core:2.0
options: --privileged
steps:
- name: Install dependencies
run: unset HOME; tdnf install -y build-essential git openssl-devel ca-certificates tar helm
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: oras-project/setup-oras@v1
with:
version: 1.2.0
- name: Run cargo test
run: cargo test

build:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/cbl-mariner/base/core:2.0
steps:
- name: Install dependencies
run: unset HOME; tdnf install -y build-essential git openssl-devel ca-certificates
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install cargo-generate-rpm
run: cargo install cargo-generate-rpm
- name: Build
run: cargo build --release
- name: Generate RPM package
run: cargo generate-rpm

release-dry-run:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/cbl-mariner/base/core:2.0
steps:
- name: Install dependencies
run: unset HOME; tdnf install -y build-essential git openssl-devel ca-certificates
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: katyo/publish-crates@v2
with:
dry-run: true
ignore-unpublished-changes: true
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generates a source tarball, including depedencies, and uploads it to GitHub releases
name: release

on: push

jobs:
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
ignore-unpublished-changes: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -396,3 +396,4 @@ FodyWeavers.xsd

# JetBrains Rider
*.sln.iml
target
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Breaking Changes
### Added
### Fixed

## 0.1.0 - 2024-08-30

Initial release
Loading

0 comments on commit 13062b3

Please sign in to comment.