Add docker build (#1)
This commit is contained in:
10
.github/workflows/build-version.yaml
vendored
10
.github/workflows/build-version.yaml
vendored
@ -21,7 +21,7 @@ jobs:
|
||||
target: aarch64-apple-darwin
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
@ -34,20 +34,20 @@ jobs:
|
||||
args: --release --all-features --target=${{ matrix.target }}
|
||||
|
||||
- name: Archive build artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build-${{matrix.target}}
|
||||
path: ${{ github.workspace }}/target/${{ matrix.target }}/release/clin
|
||||
path: ${{ github.workspace }}/target/${{ matrix.target }}/release/dudo
|
||||
|
||||
release:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
|
||||
- name: Set version variable
|
||||
run: echo "CLIN_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
|
||||
|
10
.github/workflows/container-stable.yaml
vendored
10
.github/workflows/container-stable.yaml
vendored
@ -9,9 +9,11 @@ on:
|
||||
jobs:
|
||||
containerization:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set action link variable
|
||||
run: echo "LINK=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV
|
||||
@ -26,14 +28,14 @@ jobs:
|
||||
uses: docker/setup-buildx-action@master
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.CR_PAT }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
context: .
|
||||
|
10
.github/workflows/container-version.yaml
vendored
10
.github/workflows/container-version.yaml
vendored
@ -9,9 +9,11 @@ on:
|
||||
jobs:
|
||||
containerization:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set version variable
|
||||
run: echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
|
||||
@ -29,14 +31,14 @@ jobs:
|
||||
uses: docker/setup-buildx-action@master
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.CR_PAT }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
context: .
|
||||
|
18
.github/workflows/tests.yaml
vendored
18
.github/workflows/tests.yaml
vendored
@ -9,27 +9,11 @@ on:
|
||||
- "src/**"
|
||||
|
||||
jobs:
|
||||
cargo_udeps:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: nightly
|
||||
|
||||
- name: Install cargo-udeps
|
||||
run: cargo install cargo-udeps --locked
|
||||
|
||||
- name: Check dependencies
|
||||
run: cargo +nightly udeps
|
||||
|
||||
cargo_test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
|
25
.github/workflows/udeps_test.yaml
vendored
Normal file
25
.github/workflows/udeps_test.yaml
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
name: "Tests"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
cargo_udeps:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: nightly
|
||||
|
||||
- name: Install cargo-udeps
|
||||
run: cargo install cargo-udeps --locked
|
||||
|
||||
- name: Check dependencies
|
||||
run: cargo +nightly udeps
|
||||
|
Reference in New Issue
Block a user