日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網為廣大站長提供免費收錄網站服務,提交前請做好本站友鏈:【 網站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(50元/站),

點擊這里在線咨詢客服
新站提交
  • 網站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會員:747

本文介紹了嘗試發布到包時,GitHub操作工作流(私有回購)掛起的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

私有存儲庫的Github操作工作流:

在IntelliJ項目中,OrionDAO是Orion項目的一個方面,因此必須首先運行。

部分OrionDAO POM如下:

<project xmlns="http://maven.apache.org/POM/4.0.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <groupId>uk.co.xxxx.orionDAO</groupId>
   <artifactId>orionDAO</artifactId>
   <packaging>jar</packaging>
   <name>Orion Model</name>
   <description>Orion </description>
   <version>25.1.3</version>

……….


   <distributionManagement>
      <repository>
         <id>github</id>
         <name>Apache Maven Packages</name>
         <url>https://maven.pkg.github.com/xxxx/Orion_CICD</url>
      </repository>
   </distributionManagement>
</project>

獵戶座POM的一部分如下:

4.0.0

<groupId>uk.co.xxxx.orion</groupId>
<artifactId>orion</artifactId>
<version>25.1.3</version>
<packaging>war</packaging>

<name>Orion</name>
<description>Orion </description>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.4.2</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>15</java.version>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    <hapi-fhir-version>4.2.0</hapi-fhir-version>

</properties>

<dependencies>
    <dependency>
        <groupId>uk.co.xxxx.orionDAO</groupId>
        <artifactId>orionDAO</artifactId>
        <version>25.1.3</version>
        <scope>provided</scope>
    </dependency>

</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <skipTests>true</skipTests>
            </configuration>
        </plugin>
    </plugins>
    <finalName>orion</finalName>
</build>

<distributionManagement>
    <repository>
        <id>github</id>
        <name>GitHub ReedInPartnership Apache Maven Packages</name>
        <url>https://maven.pkg.github.com/xxxx/Orion_CICD</url>
    </repository>
</distributionManagement>

在部署步驟之前,這一切都運行良好。

然后它就停在那里。

我添加了權限:步驟,但仍掛起。

# This workflow will trigger when a PR is closed and will put out a message
# dependant upon Orion being built and deployed to the Master branch

name: Master Workflow - PR message output and build and deploy
on:
  pull_request:
    types: closed
    branches:
      - master

permissions:
  contents: read
  packages: write

jobs:
  merge_job:
    # this job will only run if the PR has been merged
    if: github.event.pull_request.merged == true
    runs-on: windows-latest
    steps:
      - run: |
          echo PR #${{ github.event.number }} has been merged

  close_job:
    # this job will only run if the PR has been closed without being merged
    if: github.event.pull_request.merged == false
    runs-on: windows-latest
    steps:
      - run: |
          echo PR #${{ github.event.number }} has been closed without being merged

  deploy_job:
    # this job will only run if the PR has been merged i.e merge-job completed successfully
    needs: merge_job
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK 16 for now
        uses: actions/setup-java@v2
        with:
          java-version: '16'
          distribution: 'adopt'

      - name: Set up Maven
        uses: stCarolas/setup-maven@v4
        with:
          maven-version: 3.6.3

      - name: Cache Maven packages
        uses: actions/cache@v2
        with:
          path: ~/.m2
          key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
          restore-keys: ${{ runner.os }}-m2

      - name: 'Create settings.xml'
        uses: whelk-io/maven-settings-xml-action@v4
        with:
          repositories: '[{ "id": "github", "url": "https://maven.pkg.github.com/ReedInPartnership/Orion_CICD" }]'
          servers: '[{"id": "github", "username": "${{ secrets.GITHUB_USERNAME }}", "password": "${{ secrets.GITHUB_PASSWORD }}"}]'

      - name: Install Jespa
        run: mvn install:install-file "-Dfile=Orionjespa-1.2.6.jar" "-DgroupId=jespa" "-DartifactId=jespa" "-Dversion=1.2.6" "-Dpackaging=jar" "-DgeneratePom=true"

      - name: Build with Maven (Orion DAO)
        run: mvn -B install --file Orion_DAO/pom.xml

      - name: Build with Maven (Orion)
        run: mvn -B install --file Orion/pom.xml

      - name: Publish to GitHub Packages Orion
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: mvn --batch-mode --file Orion/pom.xml deploy

輸出:上傳JAR和POM到GitHub時掛起

*更新*
*更新*
*更新*

我是合并請求的創建者,也是合并請求的合并者,我想這可能就是它掛起的原因。因此,我讓其他人(審閱者)進行合并,現在它沒有掛起,但我收到了以下錯誤

Error:  Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project orion: Failed to deploy artifacts: Could not transfer artifact uk.co.reed.orion:orion:war:25.1.3 from/to github (https://maven.pkg.github.com/xxxx/Orion_CICD): Transfer failed for https://maven.pkg.github.com/xxxx/Orion_CICD/uk/co/reed/orion/orion/25.1.3/orion-25.1.3.war 401 Unauthorized -> [Help 1]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Error: Process completed with exit code 1.

*更新2*
*更新2*
*更新2*

我現在已經讓另一位具有管理員訪問權限的審閱者來合并這一點,我們回到了剛剛掛起的maven部署步驟中的工作流??!

推薦答案

最后,我創建了一個發布工作流,然后它創建了包。似乎包只在發布事件類型上創建,盡管我在我閱讀的所有文檔中都找不到這一點。

# This workflow will build and publish to Github Packages on release

name: Master Workflow - Build and Publish to GitHub Packages
on:
  release:
    types: [created]
jobs:
  publish:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-java@v2
        with:
          java-version: '16'
          distribution: 'adopt'

      - name: Install Jespa
        run: mvn install:install-file "-Dfile=Orionjespa-1.2.6.jar" "-DgroupId=jespa" "-DartifactId=jespa" "-Dversion=1.2.6" "-Dpackaging=jar" "-DgeneratePom=true"

      - name: Build with Maven (Orion DAO)
        run: mvn -B install --file Orion_DAO/pom.xml

      - name: Build with Maven (Orion)
        run: mvn -B install --file Orion/pom.xml

      - name: Publish package
        run: mvn --batch-mode --file Orion/pom.xml deploy
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

這篇關于嘗試發布到包時,GitHub操作工作流(私有回購)掛起的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,

分享到:
標簽:發布 回購 嘗試 工作流 掛起 操作 私有
用戶無頭像

網友整理

注冊時間:

網站:5 個   小程序:0 個  文章:12 篇

  • 51998

    網站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會員

趕快注冊賬號,推廣您的網站吧!
最新入駐小程序

數獨大挑戰2018-06-03

數獨一種數學游戲,玩家需要根據9

答題星2018-06-03

您可以通過答題星輕松地創建試卷

全階人生考試2018-06-03

各種考試題,題庫,初中,高中,大學四六

運動步數有氧達人2018-06-03

記錄運動步數,積累氧氣值。還可偷

每日養生app2018-06-03

每日養生,天天健康

體育訓練成績評定2018-06-03

通用課目體育訓練成績評定