diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e234020..ba8a352 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -138,6 +138,7 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + # Extract metadata (tags, labels) for Docker # https://github.com/docker/metadata-action - name: Extract Docker metadata @@ -146,6 +147,11 @@ jobs: with: images: | ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=edge + type=ref,event=branch + type=ref,event=pr + - name: Build WebUI run: ./webui/build.sh - name: Build CLI diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d6b3268..5bcb9ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -143,6 +143,7 @@ jobs: uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 + # Login against a Docker registry except on PR # https://github.com/docker/login-action - name: Login to GitHub Container Registry @@ -158,6 +159,7 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + # Extract metadata (tags, labels) for Docker # https://github.com/docker/metadata-action - name: Extract Docker metadata @@ -167,6 +169,11 @@ jobs: images: | ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} bililive/recorder + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + - name: Build WebUI run: ./webui/build.sh - name: Build CLI