Skip to content

Version 0.4.0

Version 0.4.0 #84

Workflow file for this run

name: Test and Build Wasm OIDC Plugin
on:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
container:
image: antonengelhardt/rust-docker-tools
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run tests
run: |
rustc --version && cargo --version
cargo clippy
cargo test --workspace --verbose
- name: Cargo Deny
uses: EmbarkStudios/cargo-deny-action@v1
build:
needs: test
runs-on: ubuntu-latest
container:
image: antonengelhardt/rust-docker-tools
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build
run: |
cargo build --target wasm32-wasi --release
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: wasm_oidc_plugin.wasm
path: target/wasm32-wasi/release/wasm_oidc_plugin.wasm
docker-image:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Push to Docker Hub
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: antonengelhardt/wasm-oidc-plugin:latest
ghcr-image:
runs-on: ubuntu-latest
needs: test
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push to GHCR
run: |
docker build -t ghcr.io/antonengelhardt/wasm-oidc-plugin:latest .
docker push ghcr.io/antonengelhardt/wasm-oidc-plugin:latest