Skip to content

giga36 update for linux #27

giga36 update for linux

giga36 update for linux #27

name: Docker Recompute
on:
push:
branches:
- 'master'
paths:
- 'chiapos/linux/x86_64/chia_recompute*'
workflow_dispatch:
# Automatically cancel previous runs for the same ref (i.e. branch) and event type. The latter component prevents
# manually dispatched events from being cancelled by pushes to the `master` branch.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
build-and-push-chia-recompute-image:
name: Build and push chia-recompute image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/chia-recompute
strategy:
fail-fast: false
matrix:
include:
- final-build-stage: 'base'
latest-tag-behaviour: true
version-suffix: ''
suffix-onlatest: false
- final-build-stage: nvidia
latest-tag-behaviour: true
version-suffix: '-nvidia'
suffix-onlatest: true
- final-build-stage: intel
latest-tag-behaviour: true
version-suffix: '-intel'
suffix-onlatest: true
- final-build-stage: amd
latest-tag-behaviour: true
version-suffix: '-amd'
suffix-onlatest: true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=${{ matrix.latest-tag-behaviour }}
suffix=${{ matrix.version-suffix }},onlatest=${{ matrix.suffix-onlatest }}
tags: |
type=raw,latest
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to the container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: chiapos/linux/x86_64
target: ${{ matrix.final-build-stage }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max