fix: use explicit tags instead of metadata-action
This commit is contained in:
parent
7e7fd74b40
commit
01f07ab323
1 changed files with 15 additions and 20 deletions
35
.github/workflows/nightly.yml
vendored
35
.github/workflows/nightly.yml
vendored
|
|
@ -31,6 +31,7 @@ jobs:
|
||||||
outputs:
|
outputs:
|
||||||
version: ${{ steps.version.outputs.version }}
|
version: ${{ steps.version.outputs.version }}
|
||||||
tag: ${{ steps.version.outputs.tag }}
|
tag: ${{ steps.version.outputs.tag }}
|
||||||
|
date: ${{ steps.version.outputs.date }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
@ -52,8 +53,10 @@ jobs:
|
||||||
|
|
||||||
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
||||||
echo "tag=${TAG}" >> $GITHUB_OUTPUT
|
echo "tag=${TAG}" >> $GITHUB_OUTPUT
|
||||||
|
echo "date=${DATE}" >> $GITHUB_OUTPUT
|
||||||
echo "Generated version: ${VERSION}"
|
echo "Generated version: ${VERSION}"
|
||||||
echo "Generated tag: ${TAG}"
|
echo "Generated tag: ${TAG}"
|
||||||
|
echo "Generated date: ${DATE}"
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build Picoclaw
|
name: Build Picoclaw
|
||||||
|
|
@ -97,23 +100,15 @@ jobs:
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Extract metadata for Docker
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
||||||
tags: |
|
|
||||||
type=raw,value=nightly-{{date 'YYYYMMDD'}},priority=100
|
|
||||||
type=raw,value=nightly,priority=90
|
|
||||||
type=sha,prefix={{branch}}-,priority=50
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: |
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
ghcr.io/${{ github.repository }}:${{ needs.generate-version.outputs.tag }}
|
||||||
|
ghcr.io/${{ github.repository }}:nightly-${{ needs.generate-version.outputs.date }}
|
||||||
|
ghcr.io/${{ github.repository }}:nightly
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
|
|
@ -152,28 +147,28 @@ jobs:
|
||||||
- `picoclaw-linux-amd64` - Pre-built binary for Linux x86_64
|
- `picoclaw-linux-amd64` - Pre-built binary for Linux x86_64
|
||||||
|
|
||||||
### Docker Image
|
### Docker Image
|
||||||
```bash
|
\`\`\`bash
|
||||||
docker pull ghcr.io/${{ github.repository }}:nightly-$(date +%Y%m%d)
|
docker pull ghcr.io/${{ github.repository }}:nightly-$(date +%Y%m%d)
|
||||||
# or latest nightly
|
# or latest nightly
|
||||||
docker pull ghcr.io/${{ github.repository }}:nightly
|
docker pull ghcr.io/${{ github.repository }}:nightly
|
||||||
```
|
\`\`\`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🔧 Installation
|
## 🔧 Installation
|
||||||
|
|
||||||
### Using binary
|
### Using binary
|
||||||
```bash
|
\`\`\`bash
|
||||||
chmod +x picoclaw
|
chmod +x picoclaw
|
||||||
sudo mv picoclaw /usr/local/bin/
|
sudo mv picoclaw /usr/local/bin/
|
||||||
```
|
\`\`\`
|
||||||
|
|
||||||
### Using Docker
|
### Using Docker
|
||||||
```bash
|
\`\`\`bash
|
||||||
docker run -d --name picoclaw \
|
docker run -d --name picoclaw \\
|
||||||
-v /path/to/config:/config \
|
-v /path/to/config:/config \\
|
||||||
ghcr.io/${{ github.repository }}:nightly
|
ghcr.io/${{ github.repository }}:nightly
|
||||||
```
|
\`\`\`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue