mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-05-23 06:15:13 +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:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- v0.19.*
|
- v*
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
deploy:
|
python-packages:
|
||||||
|
|
||||||
name: Build everything
|
name: Release Python packages
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
id-token: write
|
id-token: write
|
||||||
|
|
@ -27,27 +27,44 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
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
|
- name: Get version
|
||||||
id: version
|
id: version
|
||||||
run: echo VERSION=$(git describe --exact-match --tags | sed 's/^v//') >> $GITHUB_OUTPUT
|
run: echo VERSION=$(git describe --exact-match --tags | sed 's/^v//') >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- run: echo ${{ steps.version.outputs.VERSION }}
|
|
||||||
|
|
||||||
- name: Build packages
|
- name: Build packages
|
||||||
run: make packages VERSION=${{ steps.version.outputs.VERSION }}
|
run: make packages VERSION=${{ steps.version.outputs.VERSION }}
|
||||||
|
|
||||||
- name: Publish release distributions to PyPI
|
- name: Publish release distributions to PyPI
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
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
|
- name: Extract metadata for container
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v4
|
uses: docker/metadata-action@v4
|
||||||
|
|
@ -60,6 +77,12 @@ jobs:
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
type=sha
|
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
|
- name: Build and push Docker image
|
||||||
id: push
|
id: push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
|
|
@ -70,6 +93,28 @@ jobs:
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
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
|
- name: Create deploy bundle
|
||||||
run: templates/generate-all deploy.zip ${{ steps.version.outputs.VERSION }}
|
run: templates/generate-all deploy.zip ${{ steps.version.outputs.VERSION }}
|
||||||
|
|
||||||
|
|
|
||||||
2
Makefile
2
Makefile
|
|
@ -104,5 +104,5 @@ update-dcs: set-version
|
||||||
|
|
||||||
docker-hub-login:
|
docker-hub-login:
|
||||||
cat docker-token.txt | \
|
cat docker-token.txt | \
|
||||||
docker login -u trustgraph --password-stdin registry-1.docker.io
|
${DOCKER} login -u trustgraph --password-stdin registry-1.docker.io
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue