mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 08:26:21 +02:00
Fix/release broken (#257)
* Break release into 3 jobs * Replace Github action with podman command
This commit is contained in:
parent
542209423b
commit
dc2b599fda
2 changed files with 61 additions and 16 deletions
75
.github/workflows/release.yaml
vendored
75
.github/workflows/release.yaml
vendored
|
|
@ -5,17 +5,17 @@ on:
|
|||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- v0.19.*
|
||||
- v*
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
deploy:
|
||||
python-packages:
|
||||
|
||||
name: Build everything
|
||||
runs-on: ubuntu-latest
|
||||
name: Release Python packages
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
|
|
@ -27,27 +27,44 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ vars.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_SECRET }}
|
||||
|
||||
- name: Install build dependencies
|
||||
run: pip3 install jsonnet
|
||||
|
||||
- name: Get version
|
||||
id: version
|
||||
run: echo VERSION=$(git describe --exact-match --tags | sed 's/^v//') >> $GITHUB_OUTPUT
|
||||
|
||||
- run: echo ${{ steps.version.outputs.VERSION }}
|
||||
|
||||
- name: Build packages
|
||||
run: make packages VERSION=${{ steps.version.outputs.VERSION }}
|
||||
|
||||
- name: Publish release distributions to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
|
||||
deploy-container-image:
|
||||
|
||||
name: Release container image
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
environment:
|
||||
name: release
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Docker Hub token
|
||||
run: echo ${{ secrets.DOCKER_SECRET }} > docker-token.txt
|
||||
|
||||
- name: Authenticate with Docker hub
|
||||
run: make docker-hub-login
|
||||
|
||||
- name: Get version
|
||||
id: version
|
||||
run: echo VERSION=$(git describe --exact-match --tags | sed 's/^v//') >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Put version into package manifests
|
||||
run: make update-package-versions VERSION=${{ steps.version.outputs.VERSION }}
|
||||
|
||||
- name: Extract metadata for container
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
|
|
@ -60,6 +77,12 @@ jobs:
|
|||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=sha
|
||||
|
||||
- name: Build containers
|
||||
run: make container VERSION=${{ steps.version.outputs.VERSION }}
|
||||
|
||||
- name: Push containers
|
||||
run: make push VERSION=${{ steps.version.outputs.VERSION }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
id: push
|
||||
uses: docker/build-push-action@v6
|
||||
|
|
@ -70,6 +93,28 @@ jobs:
|
|||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
release-bundle:
|
||||
|
||||
name: Upload release bundle
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
environment:
|
||||
name: release
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install build dependencies
|
||||
run: pip3 install jsonnet
|
||||
|
||||
- name: Get version
|
||||
id: version
|
||||
run: echo VERSION=$(git describe --exact-match --tags | sed 's/^v//') >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create deploy bundle
|
||||
run: templates/generate-all deploy.zip ${{ steps.version.outputs.VERSION }}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue