github-actions - JIB 与 GitHub 操作

标签 github-actions jib

简介

我目前正在创建一个 GitHub Actions,它会自动构建一个容器。

而且我想知道是否可以创建一个 GitHub 操作来自动构建容器而无需在项目的 pom.xml 中添加 JIB

如果我们做不到,你能告诉我怎么做吗?

最佳答案

是的,你可以,在你的 GitHub 工作流上写下这段代码:

name: JIB container publish

on:
  release:
    types: [created]

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - name: JIB container build and publish
        uses: MathieuSoysal/jib-container-publish.yml@v2.0.7
        with:
          PASSWORD: ${{ secrets.GITHUB_TOKEN }}

更多详情可以进入:https://github.com/MathieuSoysal/jib-container-publish.yml

关于github-actions - JIB 与 GitHub 操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70928372/

相关文章:

github - 如何将参数化 secret 传递给可重用的 GitHub Action 工作流程?

docker - Jib:如何在不安装的情况下使用 amazon-ecr-credential-helper?

php - 为azure windows web应用程序terraform设置php版本时出错

python - GitHub 操作 setup-python 停止工作

amazon-web-services - Github 工作流 CI/CD 失败

github-actions - GitHub 操作 : How to override the default matrix with workflow_dispatch inputs?

java - Jib 插件无法访问由另一个 Gradle 插件更新的 project.version

docker - 在 Distroless Image(Java 应用程序)中添加 SSL 证书

java - dockerBuild 失败导致不支持的类文件主要版本 61 错误

spring-boot - 使用JIB插件对Spring Boot应用程序进行Docker化