chore: update legacy docker action #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Docker Legacy Releases' | |
'on': | |
push: | |
branches: | |
- legacy | |
paths: | |
- .github/workflows/docker-release-legacy.yml | |
- lib/** | |
- '!**/maintainer.js' | |
- '!**/radar.js' | |
- '!lib/**/*.test.ts' | |
- Dockerfile | |
workflow_dispatch: {} | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract Docker metadata (legacy) | |
id: meta-legacy | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
${{ secrets.DOCKER_USERNAME }}/rsshub | |
ghcr.io/${{ github.repository }} | |
tags: | | |
type=raw,value=legacy,enable=true | |
type=raw,value=legacy-{{date 'YYYY-MM-DD'}},enable=true | |
type=sha,format=long,prefix=,enable=true | |
flavor: latest=false | |
- name: Build and push Docker image (legacy) | |
id: build-and-push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta-legacy.outputs.tags }} | |
labels: ${{ steps.meta-legacy.outputs.labels }} | |
platforms: linux/amd64,linux/arm/v7,linux/arm64 | |
cache-from: type=gha,scope=docker-release | |
cache-to: type=gha,mode=max,scope=docker-release |