[英]GitHub Actions flutter-action job fails when I use a private container
I use the following Dockerfile to create an image that I then push to google cloud container registry as a private image.我使用以下 Dockerfile 创建一个图像,然后将其作为私有图像推送到谷歌云容器注册表。 I want to run my CD workflow in my workflow so that I can fetch deployment credentials that I store within my image.
我想在我的工作流程中运行我的 CD 工作流程,以便我可以获取存储在我的映像中的部署凭据。
Side Note: Not sure if this is the safest method to be managing sensitive files such as
.jks
files I need to deploy my app to play store.旁注:不确定这是否是管理敏感文件(例如
.jks
文件)的最安全方法,我需要将应用程序部署到 Play 商店。 I'd appreciate it if anyone could shed some light on this as well (Not sure if I should move this side note to a different SO question).如果有人也能对此有所了解,我将不胜感激(不确定我是否应该将此旁注移至另一个 SO 问题)。
FROM ubuntu:latest
COPY Gemfile .
COPY Gemfile.lock .
COPY fastlane/ ./fastlane/
Following is the contents of my workflow configuration in .github/workflows/main.yml
.以下是我在
.github/workflows/main.yml
中的工作流配置内容。 See here for complete file . 有关完整文件,请参见此处。
# This is a basic workflow to help you get started with Actions
# [ ... ]
jobs:
build:
runs-on: ubuntu-latest
container:
image: gcr.io/positive-affirmations-313800/droid-deploy-env:latest
credentials:
username: _json_key
password: ${{ secrets.GCR_JSON_KEY }}
steps:
- uses: actions/checkout@v2
working-directory: $HOME
- uses: actions/setup-java@v1
working-directory: $HOME
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
working-directory: $HOME
with:
flutter-version: '2.0.5'
# [ ... ]
But I keep getting this error:但我不断收到此错误:
I found the solution to the problem.我找到了问题的解决方案。
I was just missing xz-utils on my container so I updated my docker image to install it我只是在我的容器上缺少 xz-utils,所以我更新了我的 docker 映像来安装它
Referenced from the related github issue here
引用自相关的github 问题here
FROM ubuntu:latest
RUN apt-get update && apt-get install -y \
xz-utils \
git \
android-sdk \
&& rm -rf /var/lib/apt/lists/*
COPY Gemfile .
COPY Gemfile.lock .
COPY fastlane/ ./fastlane/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.