Skip to content

Commit 3a5ba64

Browse files
committed
workout
1 parent 32a7da5 commit 3a5ba64

File tree

3 files changed

+29
-12
lines changed

3 files changed

+29
-12
lines changed

.github/workflows/release.yaml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010
contents: write
1111

1212
env:
13-
REGISTRY: ghcr.io
13+
GH_REGISTRY: ghcr.io
1414
IMAGE_NAME: ${{ github.repository }}
1515
RELEASE_VERSION: ${{ github.ref_name }}
1616

@@ -43,17 +43,17 @@ jobs:
4343
steps:
4444
- name: Checkout repository
4545
uses: actions/checkout@v5
46-
- name: Log in to the Container registry
46+
- name: Log in to the GitHub Container registry
4747
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
4848
with:
49-
registry: ${{ env.REGISTRY }}
49+
registry: ${{ env.GH_REGISTRY }}
5050
username: ${{ github.actor }}
5151
password: ${{ secrets.GITHUB_TOKEN }}
5252
- name: Extract metadata (tags, labels) for Docker
5353
id: meta
5454
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
5555
with:
56-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
56+
images: ${{ env.GH_REGISTRY }}/${{ env.IMAGE_NAME }}
5757
- name: Set up QEMU
5858
uses: docker/setup-qemu-action@v3
5959
- name: Set up Docker Buildx
@@ -69,10 +69,27 @@ jobs:
6969
labels: ${{ steps.meta.outputs.labels }}
7070
build-args: |
7171
VERSION=${{ env.RELEASE_VERSION }}
72+
- name: Login to Docker Hub
73+
uses: docker/login-action@v2
74+
with:
75+
username: ${{ secrets.DOCKERHUB_USERNAME }}
76+
password: ${{ secrets.DOCKERHUB_TOKEN }}
77+
- name: Build and push
78+
uses: docker/build-push-action@v4
79+
with:
80+
context: .
81+
platforms: linux/amd64,linux/arm64
82+
push: true
83+
tags: |
84+
controlplane/netassert:${{ github.ref_name }}
85+
controlplane/netassert:latest
86+
build-args: |
87+
VERSION=${{ env.RELEASE_VERSION }}
88+
7289
- name: Generate artifact attestation
7390
uses: actions/attest-build-provenance@v3
7491
with:
75-
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
92+
subject-name: ${{ env.GH_REGISTRY }}/${{ env.IMAGE_NAME}}
7693
subject-digest: ${{ steps.push.outputs.digest }}
7794
push-to-registry: true
7895

@@ -85,8 +102,8 @@ jobs:
85102
run: |
86103
CLEAN_VERSION=$(echo "$RELEASE_VERSION" | sed 's/^v//')
87104
echo "Using chart version and appVersion: $CLEAN_VERSION"
88-
sed -i "s/^version:$/version: ${CLEAN_VERSION}/" ./helm/Chart.yaml
89-
sed -i "s/^appVersion:$/appVersion: ${CLEAN_VERSION}/" ./helm/Chart.yaml
105+
sed -i "s/^version:.*/version: ${CLEAN_VERSION}/" ./helm/Chart.yaml
106+
sed -i "s/^appVersion:.*/appVersion: ${CLEAN_VERSION}/" ./helm/Chart.yaml
90107
helm package ./helm -d .
91108
- name: Push Helm chart to GHCR
92109
run: |

cmd/netassert/cli/run.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ type runCmdConfig struct {
3535
var runCmdCfg = runCmdConfig{
3636
TapFile: "results.tap", // name of the default TAP file where the results will be written
3737
SuffixLength: 9, // suffix length of the random string to be appended to the container name
38-
SnifferContainerImage: "docker.io/controlplane/netassertv2-packet-sniffer:latest",
38+
SnifferContainerImage: "docker.io/controlplane/netassertv2-packet-sniffer:v1.1.7",
3939
SnifferContainerPrefix: "netassertv2-sniffer",
40-
ScannerContainerImage: "docker.io/controlplane/netassertv2-l4-client:latest",
40+
ScannerContainerImage: "docker.io/controlplane/netassertv2-l4-client:v1.0.6",
4141
ScannerContainerPrefix: "netassertv2-client",
4242
PauseInSeconds: 1, // seconds to pause before each test case
4343
PacketCaptureInterface: `eth0`, // the interface used by the sniffer image to capture traffic

helm/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v1
2-
description: NetAssert.
2+
description: NetAssert
33
name: netassert
4-
version:
5-
appVersion:
4+
version: 1.0.0-dev
5+
appVersion: 1.0.0-dev
66
home: https://github.com/controlplaneio/netassert
77
sources:
88
- https://github.com/controlplaneio/netassert

0 commit comments

Comments
 (0)