Build Feishin image #3
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: Build Feishin image | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'feishin/**' | |
- '!feishin/README.md' | |
- '.github/workflows/build-feishin.yml' | |
workflow_dispatch: | |
schedule: | |
- cron: '35 4 * * 6' # Every Saturday at 04:35am | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
strategy: | |
matrix: | |
version: ['0.12.1'] | |
steps: | |
- name: Check-out repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push image to registry | |
uses: docker/build-push-action@v5 | |
with: | |
platforms: linux/amd64 | |
context: ./feishin | |
file: ./feishin/Dockerfile | |
push: true | |
build-args: | | |
VERSION=${{ matrix.version }} | |
tags: | | |
ghcr.io/f-bn/feishin:${{ matrix.version }} | |
ghcr.io/f-bn/feishin:latest |