Skip to content

Commit a8656db

Browse files
add release workflow
1 parent fe1c79a commit a8656db

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.github/workflows/release.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build & Release Image
2+
on:
3+
push:
4+
tags:
5+
- 'v[0-9]+.[0-9]+.[0-9]+'
6+
- 'v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+'
7+
8+
jobs:
9+
build:
10+
needs: test
11+
runs-on: ubuntu-latest
12+
permissions:
13+
packages: write
14+
steps:
15+
- name: Get Code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v3
20+
21+
- name: Set environment variables
22+
run: |
23+
RELEASE_VERSION=${GITHUB_REF#refs/tags/}
24+
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV
25+
echo "IMG=ghcr.io/thg-ice/netscaler-exporter:${RELEASE_VERSION}" >> $GITHUB_ENV
26+
27+
- name: Login to GitHub Container Registry
28+
uses: docker/login-action@v3
29+
with:
30+
registry: ghcr.io
31+
username: ${{github.actor}}
32+
password: ${{secrets.GITHUB_TOKEN}}
33+
34+
- name: Build and push
35+
uses: docker/build-push-action@v5
36+
with:
37+
context: .
38+
platforms: linux/amd64,linux/arm64
39+
push: true
40+
tags: ${{ env.IMG }}

metrics_full.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,8 @@
352352
],
353353

354354
"labels": [
355-
["type", "citrixadc_lb_type"],
356355
["name", "citrixadc_lb_name"],
356+
["type", "citrixadc_lb_type"],
357357
["state", "citrixadc_lb_state"]
358358
]
359359
},

0 commit comments

Comments
 (0)