kopia lustrzana https://github.com/projecthorus/radiosonde_auto_rx
Basic container workflow
rodzic
0f57b438da
commit
4ef490a43e
|
|
@ -0,0 +1,50 @@
|
|||
name: Build Container Images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'testing'
|
||||
tags:
|
||||
- 'v*'
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Calculate Container Metadata
|
||||
id: meta
|
||||
uses: crazy-max/ghaction-docker-meta@v1
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository_owner }}/radiosonde_auto_rx
|
||||
tag-semver: |
|
||||
{{version}}
|
||||
|
||||
- name: Setup QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Setup Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Cache Layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/buildx-cache
|
||||
key: buildx-cache-${{ github.sha }}
|
||||
restore-keys: |
|
||||
buildx-cache-
|
||||
|
||||
- name: Build and Push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
platforms: linux/amd64, linux/386, linux/arm64, linux/arm/v6, linux/arm/v7
|
||||
cache-from: type=local,src=/tmp/buildx-cache
|
||||
cache-to: type=local,dest=/tmp/buildx-cache-new,mode=max
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
- name: Move Cache
|
||||
run: |
|
||||
rm -rf /tmp/buildx-cache
|
||||
mv /tmp/buildx-cache-new /tmp/buildx-cache
|
||||
Ładowanie…
Reference in New Issue