docker - 如何使用 github 操作部署 tar.gz 格式的图像
问题描述
我有一个构建到图像中的容器,并压缩为具有不同名称的 .tar.gz。所以,我的图像是 postgres/db:1 - 我将它保存为 pga.tar.gz 在我的存储库中。
我正在尝试使用 github 操作将其添加到我的数字海洋注册表中。
似乎解压缩工作了..但我挂断了标签:
Run docker tag pga registry.digitalocean.com/abda-containers/abd_db1:77
Error response from daemon: No such image: pga:latest
Error: Process completed with exit code 1.
我已经尝试了所有组合,但它不起作用......所以,我在想它可能没有解压缩对吗??
name: unzip and publish to DO
on:
workflow_dispatch:
inputs:
version:
description: 'Image version'
required: true
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v2
- name: Unzip image
run: tar -zxvf pga.tar.gz
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Log in to DO Container Registry
run: doctl registry login --expiry-seconds 600
- name: Tag image
run:
docker tag pga/
registry.digitalocean.com/abda-containers/abd_db1:${{github.event.inputs.version }}
- name: Push image to DO Container Registry
run: docker push registry.digitalocean.com/abda-containers/abd_db1:${{ github.event.inputs.version }}
解决方案
推荐阅读
- r - zoo或xts如何处理二维表?
- javascript - Express Typescript 不使用中间件
- python - gpu_mem_get_free_no_cache() 实际上做了什么?[法泰]
- macos - 如何在 mac 上使用命令行创建多个文件夹/超过 20 个/?
- odoo - odoo中具有不同名称的产品和描述
- html - 使用 BeautifulSoup 刮取 IMG SRC
- android - 根据文档字段中的字符串搜索 Firestore 文档
- html - 如何使文本区域从左上角移动
- java - VideoView 在 S9 中不播放 60 秒
- c++ - QML:将 c++ 类保存在内存中