Skip to content

somleng-inventory-manager: v0.2.0 #1

somleng-inventory-manager: v0.2.0

somleng-inventory-manager: v0.2.0 #1

name: Inventory Manager Release
on:
release:
types: [published]
defaults:
run:
working-directory: inventory_manager
jobs:
build-packages:
name: Build Packages
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/somleng-inventory-manager') }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get version from tag
id: get-version
run: |
echo "debug: $GITHUB_REF_NAME"
echo "version=${GITHUB_REF_NAME#somleng-inventory-manager/}" >> $GITHUB_OUTPUT
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/somleng/somleng-inventory-manager
tags: |
type=match,pattern=somleng-inventory-manager\/(v.*),group=1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
push: true
context: inventory_manager
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: somleng
SENTRY_PROJECT: somleng-inventory-manager
with:
environment: production
version: ${{ steps.get-version.outputs.version }}