mirror of
https://github.com/sethforprivacy/p2pool-docker.git
synced 2025-12-08 00:15:04 -05:00
Enable multi-arch builds
This commit is contained in:
17
.github/workflows/update-base-image.yml
vendored
17
.github/workflows/update-base-image.yml
vendored
@@ -3,11 +3,22 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: "0 12 * * 1" # Run every Monday at noon.
|
- cron: "0 12 * * 1" # Run every Monday at noon.
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rebuild-container:
|
rebuild-container:
|
||||||
name: "Rebuild Container with the latest base image"
|
name: "Rebuild Container with the latest base image"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
-
|
||||||
|
name: Prepare outputs
|
||||||
|
id: prep
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
|
||||||
|
-
|
||||||
|
name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2.0.0
|
||||||
|
with:
|
||||||
|
platforms: linux/arm64
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2.0.0
|
uses: docker/setup-buildx-action@v2.0.0
|
||||||
@@ -31,11 +42,12 @@ jobs:
|
|||||||
id: get_tag
|
id: get_tag
|
||||||
run: echo "::set-output name=tag::$(awk -F "=" '/P2POOL_BRANCH=/ {print $2}' Dockerfile)"
|
run: echo "::set-output name=tag::$(awk -F "=" '/P2POOL_BRANCH=/ {print $2}' Dockerfile)"
|
||||||
-
|
-
|
||||||
name: Build and push to Docker Hub and Github Packages Docker Registry
|
name: Build and push to Docker Hub and GitHub Packages Docker Registry
|
||||||
id: docker_build
|
id: docker_build
|
||||||
uses: docker/build-push-action@v3.1.1
|
uses: docker/build-push-action@v3.1.1
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ github.repository_owner }}/p2pool:latest
|
ghcr.io/${{ github.repository_owner }}/p2pool:latest
|
||||||
ghcr.io/${{ github.repository_owner }}/p2pool:${{ steps.get_tag.outputs.tag }}
|
ghcr.io/${{ github.repository_owner }}/p2pool:${{ steps.get_tag.outputs.tag }}
|
||||||
@@ -45,6 +57,3 @@ jobs:
|
|||||||
org.opencontainers.image.source=${{ github.event.repository.html_url }}
|
org.opencontainers.image.source=${{ github.event.repository.html_url }}
|
||||||
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
|
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
|
||||||
org.opencontainers.image.revision=${{ github.sha }}
|
org.opencontainers.image.revision=${{ github.sha }}
|
||||||
-
|
|
||||||
name: Image digest
|
|
||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
|
||||||
22
.github/workflows/update-image-on-push.yml
vendored
22
.github/workflows/update-image-on-push.yml
vendored
@@ -2,6 +2,8 @@ name: "Update image and push to Github Packages and Docker Hub when Dockerfile i
|
|||||||
# Run this workflow every time a new commit pushed to your repository
|
# Run this workflow every time a new commit pushed to your repository
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
paths:
|
paths:
|
||||||
- 'Dockerfile'
|
- 'Dockerfile'
|
||||||
jobs:
|
jobs:
|
||||||
@@ -9,6 +11,16 @@ jobs:
|
|||||||
name: "Rebuild Container with the latest base image"
|
name: "Rebuild Container with the latest base image"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
-
|
||||||
|
name: Prepare outputs
|
||||||
|
id: prep
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
|
||||||
|
-
|
||||||
|
name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2.0.0
|
||||||
|
with:
|
||||||
|
platforms: linux/arm64
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2.0.0
|
uses: docker/setup-buildx-action@v2.0.0
|
||||||
@@ -32,11 +44,12 @@ jobs:
|
|||||||
id: get_tag
|
id: get_tag
|
||||||
run: echo "::set-output name=tag::$(awk -F "=" '/P2POOL_BRANCH=/ {print $2}' Dockerfile)"
|
run: echo "::set-output name=tag::$(awk -F "=" '/P2POOL_BRANCH=/ {print $2}' Dockerfile)"
|
||||||
-
|
-
|
||||||
name: Build and push to Docker Hub and Github Packages Docker Registry
|
name: Build and push to Docker Hub and GitHub Packages Docker Registry
|
||||||
id: docker_build
|
|
||||||
uses: docker/build-push-action@v3.1.1
|
uses: docker/build-push-action@v3.1.1
|
||||||
|
id: docker_build_push
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ github.repository_owner }}/p2pool:latest
|
ghcr.io/${{ github.repository_owner }}/p2pool:latest
|
||||||
ghcr.io/${{ github.repository_owner }}/p2pool:${{ steps.get_tag.outputs.tag }}
|
ghcr.io/${{ github.repository_owner }}/p2pool:${{ steps.get_tag.outputs.tag }}
|
||||||
@@ -46,6 +59,5 @@ jobs:
|
|||||||
org.opencontainers.image.source=${{ github.event.repository.html_url }}
|
org.opencontainers.image.source=${{ github.event.repository.html_url }}
|
||||||
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
|
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
|
||||||
org.opencontainers.image.revision=${{ github.sha }}
|
org.opencontainers.image.revision=${{ github.sha }}
|
||||||
-
|
cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/simple-monerod:latest
|
||||||
name: Image digest
|
cache-to: type=inline
|
||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user