mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 19:57:48 +02:00
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: Build Docker containers
|
|
|
|
on: push
|
|
|
|
jobs:
|
|
docker:
|
|
name: For ${{ matrix.platform }}
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
packages: write
|
|
contents: read
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform: ['linux/amd64', 'linux/386', 'linux/arm64', 'linux/arm/v7']
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Prepare image id
|
|
run: |
|
|
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
|
|
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: ./contrib/docker
|
|
file: ./contrib/docker/Dockerfile
|
|
platforms: ${{ matrix.platform }}
|
|
push: true
|
|
tags: ghcr.io/purplei2p/i2pd:latest
|