Skip to content

docs: add readme

docs: add readme #188

Workflow file for this run

name: 'Pipeline'
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: read
jobs:
checks:
name: 'checks'
if: ${{ github.event_name == 'pull_request'}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# To work with pants --changed-since we need an adequate number
# of commits in the checkout
fetch-depth: 0
- name: 'checks'
uses: ./.github/workflows/templates/checks
build:
name: 'build'
if: always() && (needs.checks.result == 'success' || needs.checks.result == 'skipped')
needs: checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install version plugin
run: |
poetry self add poetry-git-version-plugin
- name: 'docker login'
run: docker login -u _json_key -p "$ARTIFACT_SA" europe-west4-docker.pkg.dev
env:
ARTIFACT_SA: ${{ secrets.GOOGLE_CREDENTIALS }}
- name: 'set variables'
run: |
# shared/dagster is reference, but this should be the same for all packages
# so doesn't matter which one we use.
# We do need to replace '+' with '-' in the version, as docker doesn't allow '+' in tags
# but PEP 440 requires it in versions with a local tag.
echo "VERSION_PYTHON=$(poetry --directory shared/dagster_utils git-version --no-ansi)" >> $GITHUB_ENV
echo "VERSION_DOCKER=$(poetry --directory shared/dagster_utils git-version --no-ansi | tr + -)" >> $GITHUB_ENV
# Compare against last release and publish only changed packages
N_RELEASES=$(git tag --sort=committerdate --list 'v*' | wc -l | xargs echo -n)
echo "Found $N_RELEASES releases"
if [ "$N_RELEASES" -gt "0" ]; then
LAST_RELEASE=$(git tag --sort=committerdate --list 'v*' | tail -n 1)
echo "Latest release: $LAST_RELEASE"
echo "CHANGED_SINCE=tags/$LAST_RELEASE" >> $GITHUB_ENV
fi
- name: 'set version'
uses: ./.github/workflows/templates/bump_version
with:
version: ${{ env.VERSION_PYTHON }}
- name: 'publish'
uses: ./.github/workflows/templates/publish
with:
version: ${{ env.VERSION_DOCKER }}
changed_since: ${{ env.CHANGED_SINCE || ''}}