Skip to content

Commit

Permalink
Merge pull request #80 from jjjermiah/development
Browse files Browse the repository at this point in the history
test:
  • Loading branch information
jjjermiah committed Feb 3, 2024
2 parents 53459d9 + b28afe7 commit ee9720a
Showing 1 changed file with 56 additions and 54 deletions.
110 changes: 56 additions & 54 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,56 +67,56 @@ jobs:



Continuous-Deployment:
permissions:
contents: write
packages: write
issues: write
pull-requests: write
# Continuous-Deployment:
# permissions:
# contents: write
# packages: write
# issues: write
# pull-requests: write

# needs: Continuous-Integration
# # needs: Continuous-Integration

# if pulling to main, deploy to PyPI
# if: github.ref == 'refs/heads/main'
# # if pulling to main, deploy to PyPI
# # if: github.ref == 'refs/heads/main'

# Set up operating system
runs-on: ubuntu-latest
# # Set up operating system
# runs-on: ubuntu-latest

# Define job steps
steps:
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: 3.12
# # Define job steps
# steps:
# - name: Set up Python 3.12
# uses: actions/setup-python@v2
# with:
# python-version: 3.12

- name: Check-out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
# - name: Check-out repository
# uses: actions/checkout@v2
# with:
# fetch-depth: 0

- name: Install poetry
uses: snok/install-poetry@v1
# - name: Install poetry
# uses: snok/install-poetry@v1

- name: Install package
run: poetry install
# - name: Install package
# run: poetry install


# Existing jobs...
# # Existing jobs...



# This action uses Python Semantic Release v8
# What this action does:
# - Determines the next version number based on the commit history
# - Creates a new tag with the new version number
# - Pushes the new tag to GitHub
# - Creates a GitHub release with the new version number
- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
git_commit_message: 'chore(release): release ${next_version}'
# # This action uses Python Semantic Release v8
# # What this action does:
# # - Determines the next version number based on the commit history
# # - Creates a new tag with the new version number
# # - Pushes the new tag to GitHub
# # - Creates a GitHub release with the new version number
# - name: Python Semantic Release
# id: release
# uses: python-semantic-release/python-semantic-release@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# git_commit_message: 'chore(release): release ${next_version}'

# - name: Install packaging-related tool
# run:
Expand Down Expand Up @@ -241,21 +241,21 @@ jobs:
# NBIAToolkit


test_image_with_latest_tag:
needs: Continuous-Deployment
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
# test_image_with_latest_tag:
# needs: Continuous-Deployment
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v2

- name: Test Image with "latest" Tag
run: |
docker run --rm \
${{ secrets.DOCKERHUB_USERNAME }}/nbiatoolkit:latest \
NBIAToolkit
# - name: Test Image with "latest" Tag
# run: |
# docker run --rm \
# ${{ secrets.DOCKERHUB_USERNAME }}/nbiatoolkit:latest \
# NBIAToolkit

Update-README:
needs: Continuous-Deployment
# needs: Continuous-Deployment
runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/development'
steps:
Expand All @@ -269,6 +269,11 @@ jobs:
echo "Current branch is: ${{ github.base_ref }}"
echo "Current branch is: ${{ github.event_name }}"
# if main, then git pull main
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
git pull origin main
fi
# fix diverged branch
git fetch origin ${{ github.head_ref }}
git checkout ${{ github.head_ref }}
Expand All @@ -281,10 +286,7 @@ jobs:
- name: Install using PyPi
run: |
# update pip
pip install --upgrade pip
# make sure pypi packages are up to date
pip install --upgrade nbiatoolkit
pip install .
NBIAToolkit
- name: Update README code block
Expand Down

0 comments on commit ee9720a

Please sign in to comment.