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

fix(ci): Remove chaining dependancy #207

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
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
45 changes: 0 additions & 45 deletions .github/workflows/main_ci.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,30 +1,59 @@
# Workflow that runs on new SemVer tags on the default branch
# Workflow that runs on closed PRs to the default branch

name: Default Branch SemVer Tagged CI (Python)
name: Default Branch PR Merged CI (Python)

on:
push:
tags: ['v[0-9]+.[0-9]+.[0-9]+']
paths-ignore: ['README.md']
pull_request:
types: ["closed"]
branches: ["main"]

# Specify concurrency such that only one workflow can run at a time
# * Different workflow files are not affected
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

# Registry for storing Container images
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}


jobs:

# Define an autotagger job that creates tags on changes to master
# Use #major #minor in merge commit messages to bump version beyond patch
bump-tag:
runs-on: ubuntu-latest
if: |
github.event_name == 'pull_request' &&
github.event.action == 'closed' &&
github.event.pull_request.merged == true
permissions:
contents: write
outputs:
tag: ${{ steps.tag.outputs.tag }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Bump version and push tag
uses: anothrNick/[email protected]
id: tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_BRANCHES: main
WITH_V: true
DEFAULT_BUMP: patch
GIT_API_TAGGING: false

# Job for building container image
# * Builds and pushes an OCI Container image to the registry defined in the environment variables
build-container:
runs-on: ubuntu-latest
needs: bump-tag
permissions:
contents: read
packages: write
Expand Down Expand Up @@ -54,7 +83,7 @@ jobs:
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: type=semver,pattern={{version}}
tags: type=semver,pattern={{version}},value=${{ needs.bump-tag.outputs.tag }}

# Build and push the Container image to the registry
# * Creates a multiplatform-aware image
Expand All @@ -71,10 +100,10 @@ jobs:
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max


# Job to build and publish the package on PyPi as a wheel
build-wheel:
runs-on: ubuntu-latest
needs: bump-tag

steps:
# Do a non-shallow clone of the repo to ensure tags are present
Expand Down
Loading