Skip to content

corrected spelling mistake #12

corrected spelling mistake

corrected spelling mistake #12

name: cdiff food bourne infection workflow
on:
push:
branches: ["main"]
tags-ignore:
- "**"
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.11"]
steps:
# step 1: checkout repository
- name: Checkout repository
uses: actions/checkout@v3
# step 2 use environment.yml dependencies to create conda environment
- name: Set up miniconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
environment-file: environment.yml
activate-environment: cdiff_pipeline
python-version: ${{ matrix.python-version }}
# step 3
- name: Install custom tool
run: |
git clone https://github.com/ssi-dk/serum_readfilter
cd serum_readfilter
pip install .
cd ..
# step 4
#- name: Run test script
# run: |
# conda activate cdiff_pipeline
# make test
# step 5
- name: Check git tag and create a new tag if tests pass
if: ${{ success() }}
run: |
COMMIT_SHORT=$(git rev-parse --short=7 HEAD)
DIR_NAME=$(basename $(pwd))
TAG_NAME="${DIR_NAME}.${GITHUB_SHA::7}.$(date +%d-%m-%Y)"
git tag $TAG_NAME
git push origin $TAG_NAME --no-verify
echo "$TAG_NAME"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Step 6: Trigger bifrost_sp_cdiff workflow
- name: Workflow dispatch with API - trigger bifrost_sp_cdiff workflow
if: ${{ success() }}
run: |
curl -v -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.FBI_DISPATCH_TOKEN }}" \
https://api.github.com/repos/ssi-dk/bifrost_sp_cdiff/dispatches \
-d '{"event_type":"cdiff-fbi-webhook"}'