use latest radar parser #61
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] CI for releases' | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: ~ | |
jobs: | |
check-env: | |
runs-on: ubuntu-latest | |
outputs: | |
check-docker: ${{ steps.check-docker.outputs.defined }} | |
steps: | |
- id: check-docker | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
if: ${{ env.DOCKER_USERNAME != '' }} | |
run: echo "::set-output name=defined::true" | |
release: | |
runs-on: ubuntu-latest | |
needs: check-env | |
if: needs.check-env.outputs.check-docker == 'true' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Extract Docker metadata | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: ${{ secrets.DOCKER_USERNAME }}/rssbot | |
tags: | | |
type=raw,value=latest,enable=true | |
type=raw,value={{date 'YYYY-MM-DD'}},enable=true | |
flavor: latest=false | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.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 |