Skip to content

build and publish

build and publish #3

Workflow file for this run

# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: build and publish
on:
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
test3d:
uses: equinor/warmth/.github/workflows/python-test-3d.yml@main
with:
event_type: ${{ github.event_name}}
action_type: ${{ github.event.action}}
test1d:
uses: equinor/warmth/.github/workflows/python-test.yml@main
with:
event_type: ${{ github.event_name}}
action_type: ${{ github.event.action}}
snyk:
uses: equinor/warmth/.github/workflows/snyk.yml@main
secrets:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docs:
uses: equinor/warmth/.github/workflows/docs.yml@main

Check failure on line 30 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yml

Invalid workflow file

error parsing called workflow ".github/workflows/publish.yml" -> "equinor/warmth/.github/workflows/docs.yml@main" (source branch with sha:62261edff2e66dc63159a4d73767d033386652c5) : secret name `GITHUB_TOKEN` within `workflow_call` can not be used since it would collide with system reserved name
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy:
needs: [test3d, test1d, snyk, docs]
environment: deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: 'master'
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Azure key vault login
uses: Azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
allow-no-subscriptions: true
- name: Fetch secrets
uses: azure/CLI@v1
with:
azcliversion: 2.42.0
inlineScript: |
echo PYPI_TOKEN=$(az keyvault secret show --vault-name PSSCloudDev --name PYPI-Token --query value -o tsv) >> $GITHUB_ENV
- name: Install dependencies
run: |
curl -sSL https://install.python-poetry.org | python3
poetry install --with dev --no-interaction
- name: Build and publish
run: |
poetry config pypi-token.pypi ${{ env.PYPI_TOKEN }}
poetry build
poetry publish