mirror of
https://gitcode.com/gh_mirrors/gh/gh-action-pypi-publish.git
synced 2026-07-02 18:27:49 +00:00
Run smoke tests before Docker builds
https://github.com/pypa/gh-action-pypi-publish/pull/230#discussion_r1787027821
This commit is contained in:
@@ -14,8 +14,13 @@ on: # yamllint disable-line rule:truthy
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
smoke-test:
|
||||
uses: ./.github/workflows/reusable-smoke-test.yml
|
||||
build-and-push:
|
||||
if: github.event_name != 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- smoke-test
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -39,17 +44,11 @@ jobs:
|
||||
env:
|
||||
DOCKER_TAG: ${{ inputs.tag || github.ref_name }}
|
||||
- name: Log in to GHCR
|
||||
if: github.event_name != 'pull_request'
|
||||
run: >-
|
||||
echo ${{ secrets.GITHUB_TOKEN }} |
|
||||
docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
|
||||
- name: Push Docker image to GHCR
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
docker push $IMAGE
|
||||
docker push $IMAGE_MAJOR
|
||||
docker push $IMAGE_MAJOR_MINOR
|
||||
smoke-test:
|
||||
needs:
|
||||
- build-and-push
|
||||
uses: ./.github/workflows/reusable-smoke-test.yml
|
||||
|
||||
Reference in New Issue
Block a user