Comments (11)
我是作者
from twbworld.github.io.
你是我的救星
from twbworld.github.io.
name: ci
on:
workflow_dispatch: #github页面手动触发
push:
tags:
- "v*."
env:
IMAGE_NAME: test #这是您的镜像名
jobs:
get-tags:
runs-on: ubuntu-20.04
env:
TZ: Asia/Shanghai
outputs:
tags: ${{ steps.set-output-id.outputs.tags }}
steps:
- uses: actions/checkout@v2
- name: set-output
id: set-output-id
run: |
VERSION=edge
if [[ $GITHUB_REF == refs/tags/ ]]; then
VERSION=${GITHUB_REF#refs/tags/v}
fi
echo ::set-output name=tags::${VERSION}
push-ghcr:
runs-on: ubuntu-20.04
env:
TZ: Asia/Shanghai
REGISTRY: ghcr.io
steps:
- uses: actions/checkout@v2
- name: Login
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.PACKAGES_TOKEN }}
- name: Build && Push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ needs.get-tags.outputs.tags }}
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
from twbworld.github.io.
0s
Run docker/login-action@v1
Logging into ghcr.io...
Login Succeeded!
0s
Run docker/build-push-action@v2
Docker info
/usr/bin/docker buildx build --file ./Dockerfile --iidfile /tmp/docker-build-push-5JnPya/iidfile --tag ghcr.io/lanyucomputer/openwrt_s912_zyxq_R22.4.1_k5.15.34-flippy-71+o.img.gz: --tag ghcr.io/lanyucomputer/openwrt_s912_zyxq_R22.4.1_k5.15.34-flippy-71+o.img.gz:latest --metadata-file /tmp/docker-build-push-5JnPya/metadata-file --push .
error: invalid tag "ghcr.io/lanyucomputer/openwrt_s912_zyxq_R22.4.1_k5.15.34-flippy-71+o.img.gz:": invalid reference format
Error: buildx failed with: error: invalid tag "ghcr.io/lanyucomputer/openwrt_s912_zyxq_R22.4.1_k5.15.34-flippy-71+o.img.gz:": invalid reference format
from twbworld.github.io.
Run docker/build-push-action@v2
Docker info
/usr/bin/docker buildx build --file ./Dockerfile --iidfile /tmp/docker-build-push-t5PG5d/iidfile --tag ghcr.io/lanyucomputer/OpenWrt2022: --tag ghcr.io/lanyucomputer/OpenWrt2022:latest --metadata-file /tmp/docker-build-push-t5PG5d/metadata-file --push .
error: invalid tag "ghcr.io/lanyucomputer/OpenWrt2022:": invalid reference format
Error: buildx failed with: error: invalid tag "ghcr.io/lanyucomputer/OpenWrt2022:": invalid reference format
from twbworld.github.io.
换成库的名字也是这个提示,说TAG的格式不对,但脚 本是完全复制上面的
from twbworld.github.io.
换成库的名字也是这个提示,说TAG的格式不对,但脚 本是完全复制上面的
我猜测应该是ghcr.io不支持您所使用的名称,您试下在git使用简单点的名称打tag, 如"V1.0.1"
from twbworld.github.io.
感谢你的回复,我的地址库改成OpenWrt2022 也是一样的提示,原码地址https://github.com/lanyucomputer/OpenWrt2022在这里,可以帮忙看一下吗,还是报错,docker-compose.yml
是这个文件
from twbworld.github.io.
换成库的名字也是这个提示,说TAG的格式不对,但脚 本是完全复制上面的
我猜测应该是ghcr.io不支持您所使用的名称,您试下在git使用简单点的名称打tag, 如"V1.0.1"
感谢你的回复,我的地址库改成OpenWrt2022 也是一样的提示,原码地址https://github.com/lanyucomputer/OpenWrt2022在这里,可以帮忙看一下吗,还是报错,docker-compose.yml
是这个文件
from twbworld.github.io.
on:
workflow_dispatch:
push:
tags:
- "v*.*"
跟你的地址库没关, 要使用git打上一个tag,名称的格式为"v*.*",如"v1.0.1",它才会打包
或者把"${{ needs.get-tags.outputs.tags }}"写死,改为你自定义的名称
from twbworld.github.io.
写死为:lastest后报错如下
error: failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount187581008/Dockerfile: no such file or directory
Error: buildx failed with: error: failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount187581008/Dockerfile: no such file or directory
from twbworld.github.io.
Related Issues (14)
- Postman无法抓包Chrome | 忐忑の博客 HOT 1
- Postman抓包https | 忐忑の博客 HOT 1
- SSH隧道连接局域网下的虚拟机 | 忐忑の博客 HOT 1
- 制作多分区启动盘 | 忐忑の博客 HOT 3
- 搭建博客的准备 | 忐忑の博客 HOT 1
- Centos源码安装Mysql8笔记 | 忐忑の博客 HOT 1
- VMware自定义虚拟网卡(添加网络) | 忐忑の博客 HOT 1
- 学习笔记 | 忐忑の博客 HOT 1
- GitHub Actions无法触发 | 忐忑の博客 HOT 1
- 订阅 | 忐忑の博客 HOT 1
- keepalived高可用配置 | 忐忑の博客 HOT 1
- nginx开启stream模块获取真实ip | 忐忑の博客 HOT 2
- 站点导航 | 忐忑の博客
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twbworld.github.io.