mirror of
https://github.com/napnap75/multiarch-docker-images.git
synced 2025-12-16 11:44:18 +01:00
Manage environment from a file (#3)
This commit is contained in:
17
.github/workflows/build.yml
vendored
17
.github/workflows/build.yml
vendored
@@ -1,23 +1,24 @@
|
|||||||
name: CI to Docker Hub
|
name: CI to Docker Hub
|
||||||
|
|
||||||
on:
|
on: [push, pull_request, workflow_dispatch]
|
||||||
push:
|
|
||||||
branches: [ master, github-actions ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
multi:
|
multi:
|
||||||
|
env:
|
||||||
|
BUILD_PLATFORMS: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
repository: [restic-auto]
|
repository: [restic-auto]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Load specific environment
|
||||||
|
run: if [ -f ${{ matrix.repository }}/.build-env ] ; then cat ${{ matrix.repository }}/.build-env >> $GITHUB_ENV ; fi
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
|
|
||||||
@@ -35,7 +36,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: ${{ matrix.repository }}/
|
context: ${{ matrix.repository }}/
|
||||||
file: ${{ matrix.repository }}/Dockerfile
|
file: ${{ matrix.repository }}/Dockerfile
|
||||||
platforms: linux/amd64,linux/arm/v6,linux/arm64
|
platforms: ${{ env.BUILD_PLATFORMS }}
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
${{ secrets.DOCKER_HUB_USERNAME }}/${{ matrix.repository }}:latest
|
${{ secrets.DOCKER_HUB_USERNAME }}/${{ matrix.repository }}:latest
|
||||||
|
|||||||
1
restic-auto/.build-env
Normal file
1
restic-auto/.build-env
Normal file
@@ -0,0 +1 @@
|
|||||||
|
BUILD_PLATFORMS=linux/amd64,linux/arm/v6,linux/arm64
|
||||||
Reference in New Issue
Block a user