chasemapper/.github/workflows/container.yml

48 wiersze
1.3 KiB
YAML
Czysty Zwykły widok Historia

2021-04-03 11:38:41 +00:00
name: Container Images
on:
push:
branches:
- 'master'
tags:
- 'v*'
2021-04-03 11:38:41 +00:00
pull_request:
workflow_dispatch:
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Calculate Container Metadata
id: meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: ghcr.io/${{ github.repository }}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
- name: Setup Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Images
2022-09-23 00:05:38 +00:00
uses: docker/build-push-action@v3
2021-04-03 11:38:41 +00:00
with:
context: .
2022-08-29 10:56:50 +00:00
platforms: linux/amd64, linux/386, linux/arm64, linux/arm/v6, linux/arm/v7
2022-09-23 00:05:38 +00:00
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache,mode=max
2021-04-03 11:38:41 +00:00
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
2021-04-03 11:38:41 +00:00
labels: ${{ steps.meta.outputs.labels }}