mirror of
https://github.com/sergi0g/cup.git
synced 2025-11-18 09:53:43 -05:00
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
name: Build docker image
|
|
|
|
on:
|
|
release:
|
|
types:
|
|
- published
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Get latest release tag
|
|
id: release
|
|
uses: pozetroninc/github-action-get-latest-release@master
|
|
with:
|
|
owner: sergi0g
|
|
repo: cup
|
|
excludes: prerelease, draft
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
platforms: linux/amd64,linux/arm64
|
|
tags: |
|
|
ghcr.io/sergi0g/cup:latest
|
|
ghcr.io/sergi0g/cup:${{ steps.release.outputs.release }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max |