From b049df708f96991b912a0b66431c1f6b15f48aa7 Mon Sep 17 00:00:00 2001 From: Lea Vauchier Date: Tue, 16 Jul 2024 17:13:23 +0200 Subject: [PATCH] Fix deployment in githubactions --- .github/workflows/cicd_deploy.yml | 11 ++++++++++- .github/workflows/cicd_full.yml | 3 --- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cicd_deploy.yml b/.github/workflows/cicd_deploy.yml index b913dce..f26f17c 100644 --- a/.github/workflows/cicd_deploy.yml +++ b/.github/workflows/cicd_deploy.yml @@ -5,7 +5,6 @@ on: # Also run when the pull request merges (which generates a push) # So that we can tag the docker image appropriately. push: - branches: [ "master" ] tags: [ 'v*.*.*' ] env: @@ -39,6 +38,16 @@ jobs: ${{ env.TEST_TAG }} python -m pytest ./test -s --log-cli-level DEBUG + # Login against a Docker registry except on PR + # https://github.com/docker/login-action + - name: Log into registry ${{ env.REGISTRY }} + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + # Extract metadata (tags, labels) for Docker # https://github.com/docker/metadata-action - name: Extract Docker metadata diff --git a/.github/workflows/cicd_full.yml b/.github/workflows/cicd_full.yml index 6952358..a4071f9 100644 --- a/.github/workflows/cicd_full.yml +++ b/.github/workflows/cicd_full.yml @@ -45,9 +45,6 @@ jobs: test_local: runs-on: ubuntu-latest - environment: - name: pypi - url: https://pypi.org/p/ign-pdal-tools permissions: contents: read packages: write