Skip to content

Commit 05dec7a

Browse files
committed
update workflows
1 parent b2c934e commit 05dec7a

File tree

2 files changed

+17
-28
lines changed

2 files changed

+17
-28
lines changed

.github/workflows/docker.yml .github/workflows/cicd.yml

+17-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
1-
name: Publish Docker images
2-
on:
3-
workflow_run:
4-
workflows: [ "Rust" ]
5-
branches: [ "main" ]
6-
types:
7-
- completed
1+
name: CICD
2+
3+
on: [ "push", "pull_request" ]
84

95
env:
6+
CARGO_TERM_COLOR: always
107
REGISTRY: ghcr.io
118
IMAGE_NAME: ${{ github.repository }}
129

1310
jobs:
14-
build:
11+
tests:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- run: sudo apt install libpcap-dev libsasl2-dev libssl-dev
16+
- name: Build
17+
run: cargo build --verbose
18+
- name: Run tests
19+
run: cargo test --verbose
20+
21+
docker:
1522
strategy:
1623
fail-fast: false
1724
matrix:
@@ -24,7 +31,7 @@ jobs:
2431
id-token: write
2532

2633
runs-on: ${{ matrix.os }}
27-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
34+
needs: [ tests ]
2835
steps:
2936
- name: Checkout repository
3037
uses: actions/checkout@v4
@@ -51,6 +58,7 @@ jobs:
5158
with:
5259
context: .
5360
push: true
61+
provenance: false
5462
tags: ${{ steps.meta.outputs.tags }}
5563
labels: ${{ steps.meta.outputs.labels }}
5664

.github/workflows/rust.yml

-19
This file was deleted.

0 commit comments

Comments
 (0)