Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/workflows 2 #106

Merged
merged 5 commits into from
Oct 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 29 additions & 24 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ name: Build
on:
workflow_dispatch:
push:
# branches:
# - release/v0.12
branches:
- release/v0.12
tags:
- v0.12.*

Expand All @@ -29,6 +29,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- run: echo ${{ secrets.DOCKER_USERNAME }}
- run: echo ${{ secrets.DOCKER_SECRET }} | sum - | sum - | md5sum

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_SECRET }}

- name: Install build dependencies
run: pip3 install jsonnet

Expand All @@ -37,32 +46,14 @@ jobs:
run: echo VERSION=sha-$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT

- name: Build packages
run: make packages
run: make packages VERSION=${{ steps.version.outputs.VERSION }}

# - name: Build container
# run: make container

# - name: Publish release distributions to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

- name: Create deploy bundle
run: templates/generate-all deploy.zip v${{ steps.version.outputs.VERSION }}

# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# body: |
# Changes in this Release
# - First Change
# - Second Change
# draft: true
# prerelease: true

- uses: ncipollo/release-action@v1
with:
artifacts: deploy.zip
Expand All @@ -71,14 +62,28 @@ jobs:
prerelease: true
skipIfReleaseExists: true

- name: Build container
run: make container VERSION=${{ steps.version.outputs.VERSION }}

- name: Extract metadata for container
id: meta
uses: docker/metadata-action@v4
with:
images: trustgraph-flow
images: trustgraph/trustgraph-flow
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha

- name: Build and push Docker image
id: push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./Containerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

Loading