fix workflow

This commit is contained in:
mii443
2024-08-31 21:49:04 +09:00
parent b29f0e9560
commit ae3eed9e7b

View File

@@ -8,40 +8,23 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - name: Check out the repository
name: Checkout uses: actions/checkout@v2
- uses: docker/metadata-action@v3
id: meta
with:
images: ghcr.io/mii443/rs-easy-p2p
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: mii443
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1
- name: Cache Docker layers - name: Login to GitHub Container Registry
uses: actions/cache@v2 uses: docker/login-action@v3
with: with:
path: /tmp/.buildx-cache registry: ghcr.io
key: ${{ runner.os }}-buildx-${{ github.sha }} username: ${{ github.actor }}
restore-keys: | password: ${{ secrets.GITHUB_TOKEN }}
${{ runner.os }}-buildx-
- uses: docker/build-push-action@v2 - uses: docker/build-push-action@v2
with: with:
context: . context: .
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: |
labels: ${{ steps.meta.outputs.labels }} ghcr.io/mii443/rs-easy-p2p/signaling-server:${{ version }}
cache-from: type=local,src=/tmp/.buildx-cache ghcr.io/mii443/rs-easy-p2p/signaling-server:latest
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache