mirror of
https://github.com/parrazam/radicale-docker.git
synced 2024-11-04 19:34:16 +01:00
040edc4319
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4 to 5. - [Release notes](https://github.com/docker/metadata-action/releases) - [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md) - [Commits](https://github.com/docker/metadata-action/compare/v4...v5) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
71 lines
1.9 KiB
YAML
71 lines
1.9 KiB
YAML
name: Build snapshot
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- develop
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
env:
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
IMAGE_NAME_WITH_INFCLOUD: parrazam/radicale-with-infcloud
|
|
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
|
|
GH_REPO: ghcr.io
|
|
|
|
jobs:
|
|
|
|
build-and-push-docker-image:
|
|
name: Build Docker snapshot
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up QEMU
|
|
id: qemu
|
|
uses: docker/setup-qemu-action@v2
|
|
with:
|
|
image: tonistiigi/binfmt:latest
|
|
platforms: ${{ env.PLATFORMS }}
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Log into ${{ env.GH_REPO }} registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ${{ env.GH_REPO }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Log into DockerHub registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Extract Docker metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: |
|
|
${{ env.GH_REPO }}/${{ env.IMAGE_NAME }}
|
|
${{ env.IMAGE_NAME }}
|
|
${{ env.IMAGE_NAME_WITH_INFCLOUD }}
|
|
|
|
- name: Build image and push snapshot to GitHub Container Registry
|
|
id: build-and-push
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: .
|
|
platforms: ${{ env.PLATFORMS }}
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|