Skip to content

Commit

Permalink
add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
oussamarouabah committed Jun 7, 2024
1 parent fe1c79a commit a8656db
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build & Release Image
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+'

jobs:
build:
needs: test
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Get Code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set environment variables
run: |
RELEASE_VERSION=${GITHUB_REF#refs/tags/}
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV
echo "IMG=ghcr.io/thg-ice/netscaler-exporter:${RELEASE_VERSION}" >> $GITHUB_ENV
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.IMG }}
2 changes: 1 addition & 1 deletion metrics_full.json
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@
],

"labels": [
["type", "citrixadc_lb_type"],
["name", "citrixadc_lb_name"],
["type", "citrixadc_lb_type"],
["state", "citrixadc_lb_state"]
]
},
Expand Down

0 comments on commit a8656db

Please sign in to comment.