@Krembi

Что я делаю не так в Github Actions?

При передаче данных из первого джоба во второй и третий , всё работает ок, если второй и третий запускаются паралельно( параметр needs смотрит на первый). Но стоит мне поставить последовательный запуск. Почему то данные на третьем джобе становятся пустые
Отправил воркфлоу. Reusable workflow отрабатывает хорошо, так что дело не в нём.

name: .NET CI/CD - Docker Build and Push

on:
  push:
    branches:
      - development
    paths-ignore:
      - 'cicd/**'
      - '.github/workflows/**'
  workflow_dispatch:


jobs:
  determine-new-version:
    if: github.event_name != 'pull_request'
    uses: org/repo/.github/workflows/determine-new-version.yaml@development
    secrets: inherit

  build-and-push:
    if: github.event_name != 'pull_request'
    needs: determine-new-version
    uses: org/second-repo/.github/workflows/build-and-push.yaml@development
    with:
      image-tags: |
        azurecr.io/dotnet-example:${{ needs.determine-new-version.outputs.new-version }}
        azurecr.io/dotnet-example:latest
    secrets: inherit

  update-image-metadata:
    if: github.event_name != 'pull_request'
    needs: build-and-push
    uses: org/third_repo/.github/workflows/update-image-data.yaml@development
    with:
      NEW_VERSION: ${{ needs.determine-new-version.outputs.new-version }}
      FILE_PATH: ${{ needs.determine-new-version.outputs.file-path}}
    secrets: inherit
  • Вопрос задан
  • 102 просмотра
Решения вопроса 1
@vitaly_il1
DevOps Consulting
Попробуйте просто добавить determine-new-version в needs

needs: [determine-new-version,build-and-push]
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы