This repository was archived by the owner on May 4, 2025. It is now read-only.
Build wechotd image #257
This file contains hidden or 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 wechotd image | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| permissions: | |
| packages: write | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - branch: main | |
| tag: latest | |
| - branch: alpine | |
| tag: alpine | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ matrix.branch }} | |
| - uses: docker/[email protected] | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ secrets.ALIYUN_REGISTRY }} | |
| username: ${{ secrets.ALIYUN_REGISTRY_USER }} | |
| password: ${{ secrets.ALIYUN_REGISTRY_PASSWORD }} | |
| - uses: docker/[email protected] | |
| with: | |
| context: ./ | |
| file: Dockerfile | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| push: true | |
| provenance: false | |
| platforms: linux/amd64, linux/arm64 | |
| tags: | | |
| ghcr.io/${{ github.repository }}/wechotd:${{ matrix.tag }} | |
| ${{ secrets.ALIYUN_REGISTRY_REPOSITORY }}:${{ matrix.tag }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |