Compare commits
5 Commits
v0.1.10
...
c745125f20
Author | SHA1 | Date | |
---|---|---|---|
c745125f20 | |||
758fa7608f | |||
ee6b947f29 | |||
18dd1ef528 | |||
8fa7866cc2 |
31
.github/workflows/build.yml
vendored
31
.github/workflows/build.yml
vendored
@@ -20,6 +20,8 @@ jobs:
|
|||||||
detect-project:
|
detect-project:
|
||||||
name: Detect Rust Project
|
name: Detect Rust Project
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
outputs:
|
outputs:
|
||||||
project-dir: ${{ steps.detect.outputs.project-dir }}
|
project-dir: ${{ steps.detect.outputs.project-dir }}
|
||||||
project-name: ${{ steps.detect.outputs.project-name }}
|
project-name: ${{ steps.detect.outputs.project-name }}
|
||||||
@@ -56,6 +58,8 @@ jobs:
|
|||||||
needs: [detect-project]
|
needs: [detect-project]
|
||||||
if: ${{ !failure() && !cancelled() }}
|
if: ${{ !failure() && !cancelled() }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@@ -79,6 +83,8 @@ jobs:
|
|||||||
set-tag:
|
set-tag:
|
||||||
name: Set Tag Name
|
name: Set Tag Name
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
outputs:
|
outputs:
|
||||||
tag_name: ${{ steps.set_tag.outputs.tag_name }}
|
tag_name: ${{ steps.set_tag.outputs.tag_name }}
|
||||||
steps:
|
steps:
|
||||||
@@ -139,6 +145,8 @@ jobs:
|
|||||||
needs: [detect-project, test]
|
needs: [detect-project, test]
|
||||||
if: ${{ !failure() && !cancelled() }}
|
if: ${{ !failure() && !cancelled() }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
@@ -189,17 +197,6 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
${{ needs.detect-project.outputs.project-dir }}/target/${{ matrix.target }}/release/${{ needs.detect-project.outputs.project-name }}${{ matrix.os == 'windows' && '.exe' || '' }}
|
${{ needs.detect-project.outputs.project-dir }}/target/${{ matrix.target }}/release/${{ needs.detect-project.outputs.project-name }}${{ matrix.os == 'windows' && '.exe' || '' }}
|
||||||
|
|
||||||
- name: Build documentation
|
|
||||||
working-directory: ${{ needs.detect-project.outputs.project-dir }}
|
|
||||||
run: cargo doc --no-deps
|
|
||||||
|
|
||||||
- name: Deploy to GitHub Pages
|
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
publish_dir: ${{ needs.detect-project.outputs.project-dir }}/target/doc
|
|
||||||
publish_branch: gh-pages
|
|
||||||
|
|
||||||
docker-build:
|
docker-build:
|
||||||
name: Build and Push Docker Image
|
name: Build and Push Docker Image
|
||||||
needs: [detect-project, build, set-tag]
|
needs: [detect-project, build, set-tag]
|
||||||
@@ -209,6 +206,8 @@ jobs:
|
|||||||
needs.build.result == 'success' &&
|
needs.build.result == 'success' &&
|
||||||
github.event_name != 'pull_request'
|
github.event_name != 'pull_request'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
environment: production
|
environment: production
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -244,10 +243,12 @@ jobs:
|
|||||||
tag:
|
tag:
|
||||||
name: Create Tag
|
name: Create Tag
|
||||||
needs: [docker-build, build, set-tag]
|
needs: [docker-build, build, set-tag]
|
||||||
if: |
|
#if: |
|
||||||
github.event_name == 'push' &&
|
# github.event_name == 'push' &&
|
||||||
needs.docker-build.result == 'success'
|
# needs.docker-build.result == 'success'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -268,7 +269,7 @@ jobs:
|
|||||||
|
|
||||||
summary:
|
summary:
|
||||||
name: Workflow Summary
|
name: Workflow Summary
|
||||||
needs: [test, audit, build, docker-build]
|
needs: [test, build, docker-build]
|
||||||
if: always()
|
if: always()
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@@ -56,7 +56,7 @@ pub async fn get_available_container(docker: &Docker) -> Vec<DockerContainer> {
|
|||||||
})
|
})
|
||||||
.unwrap_or_else(|| "unknown".to_string());
|
.unwrap_or_else(|| "unknown".to_string());
|
||||||
|
|
||||||
println!(" - ID: {}, Image: {:?}, Name: {}", short_id, container.image, name);
|
println!(" - ID: {}, Image: {}, Name: {}", short_id, container.image.unwrap(), name);
|
||||||
|
|
||||||
Some(DockerContainer {
|
Some(DockerContainer {
|
||||||
ID: short_id.to_string(),
|
ID: short_id.to_string(),
|
||||||
|
Reference in New Issue
Block a user