tests: verify one by one to avoid timeout (#202) #227
This file contains hidden or 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: Release | |
on: | |
push: | |
branches: | |
- main | |
- release/** | |
paths-ignore: | |
- "*.md" | |
- "charts/**" | |
- "config/**" | |
workflow_dispatch: | |
jobs: | |
release: | |
permissions: | |
# to create release tags (cycjimmy/semantic-release-action) | |
contents: write | |
issues: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
outputs: | |
published: ${{ steps.semantic.outputs.new_release_published }} | |
version: ${{ steps.semantic.outputs.new_release_version }} | |
steps: | |
- uses: actions/checkout@v4 | |
if: github.event_name == 'push' | |
- name: Semantic Release | |
if: github.event_name == 'push' | |
id: semantic | |
uses: cycjimmy/semantic-release-action@v4 | |
with: | |
extra_plugins: | | |
@semantic-release/release-notes-generator@^10 | |
@semantic-release/github@^8 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
publish_operator_image: | |
needs: | |
- release | |
if: needs.release.outputs.published == 'true' || github.event_name == 'workflow_dispatch' | |
runs-on: ubuntu-latest | |
outputs: | |
image_digest: ${{ steps.build.outputs.digest }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set Tag | |
if: github.event_name == 'workflow_dispatch' | |
id: set_tag | |
run: echo "tag=dev-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: tensorfusion/tensor-fusion-operator | |
tags: ${{ github.event_name == 'workflow_dispatch' && steps.set_tag.outputs.tag || format('type=semver,pattern={{{{version}}}},value={0}', needs.release.outputs.version) }} | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push operator | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: true | |
file: dockerfile/operator.Dockerfile | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
no-cache: true | |
publish_node_discovery_image: | |
needs: | |
- release | |
if: needs.release.outputs.published == 'true' || github.event_name == 'workflow_dispatch' | |
runs-on: ubuntu-latest | |
outputs: | |
image_digest: ${{ steps.build.outputs.digest }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set Tag | |
if: github.event_name == 'workflow_dispatch' | |
id: set_tag | |
run: echo "tag=dev-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: tensorfusion/tensor-fusion-node-discovery | |
tags: ${{ github.event_name == 'workflow_dispatch' && steps.set_tag.outputs.tag || format('type=semver,pattern={{{{version}}}},value={0}', needs.release.outputs.version) }} | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push node discovery | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: true | |
file: dockerfile/node-discovery.Dockerfile | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
no-cache: true |