Notify comment updates. #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
tags: | |
- 'v*.*.*' | |
pull_request: | |
branches: [main] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_BASE_NAME: ${{ github.repository_owner }}/dse | |
jobs: | |
build: | |
runs-on: [ubuntu-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build package metadata | |
id: package_meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: foo/bar | |
tags: | | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
- name: Get package version | |
id: package | |
run: | | |
echo "PACKAGE_VERSION=${{ fromJSON(steps.package_meta.outputs.json).labels['org.opencontainers.image.version'] }}" >> $GITHUB_ENV | |
- name: Flatc build targets | |
uses: addnab/docker-run-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
image: ${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}-flatc-builder:main | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
options: | | |
--volume ${{ github.workspace }}:/work | |
--env PACKAGE_VERSION=${{ env.PACKAGE_VERSION }} | |
run: | | |
cd work; make fbs | |
- name: Python build targets | |
uses: addnab/docker-run-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
image: ${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}-python-builder:main | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
options: | | |
--volume ${{ github.workspace }}:/work | |
--env PACKAGE_VERSION=${{ env.PACKAGE_VERSION }} | |
run: | | |
cd work | |
make python | |
make msgpack | |
- name: Package | |
uses: addnab/docker-run-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
image: ${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}-python-builder:main | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
options: | | |
--volume ${{ github.workspace }}:/work | |
--env PACKAGE_VERSION=${{ env.PACKAGE_VERSION }} | |
run: | | |
cd work | |
make dist_package | |
ls -1sh ./dist/*.* | |
ls -1sh ./dist/python/dist/*.* | |
- name: Publish | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
dist/dse-schemas.tar.gz | |
dist/python/dist/dse.schemas-${{ env.PACKAGE_VERSION }}-py3-none-any.whl |