mirror of
https://github.com/sethforprivacy/p2pool-docker.git
synced 2025-12-08 16:33:32 -05:00
Migrate to tagged releases
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
name: "Update image and push to Github Packages and Docker Hub daily"
|
name: "Update image and push to Github Packages and Docker Hub weekly"
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 12 * * *" # Run every day at noon.
|
- cron: "0 12 * * 1" # Run every Monday at noon.
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
jobs:
|
jobs:
|
||||||
rebuild-container:
|
rebuild-container:
|
||||||
@@ -26,6 +26,10 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
- name: "Checkout repository"
|
- name: "Checkout repository"
|
||||||
uses: "actions/checkout@v2.3.4"
|
uses: "actions/checkout@v2.3.4"
|
||||||
|
-
|
||||||
|
name: "Get p2pool Release Tag"
|
||||||
|
id: get_tag
|
||||||
|
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
|
||||||
@@ -34,7 +38,9 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
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 }}
|
||||||
${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
||||||
|
${{ secrets.DOCKER_USERNAME }}/p2pool:${{ steps.get_tag.outputs.tag }}
|
||||||
labels: |
|
labels: |
|
||||||
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 }}
|
||||||
@@ -43,7 +49,7 @@ jobs:
|
|||||||
name: Scan new image and output results
|
name: Scan new image and output results
|
||||||
uses: Azure/container-scan@v0
|
uses: Azure/container-scan@v0
|
||||||
with:
|
with:
|
||||||
image-name: ${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
image-name: ${{ secrets.DOCKER_USERNAME }}/p2pool:${{ steps.get_tag.outputs.tag }}
|
||||||
severity-threshold: HIGH
|
severity-threshold: HIGH
|
||||||
-
|
-
|
||||||
name: Image digest
|
name: Image digest
|
||||||
10
.github/workflows/update-image-on-push.yml
vendored
10
.github/workflows/update-image-on-push.yml
vendored
@@ -27,6 +27,10 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
- name: "Checkout repository"
|
- name: "Checkout repository"
|
||||||
uses: "actions/checkout@v2.3.4"
|
uses: "actions/checkout@v2.3.4"
|
||||||
|
-
|
||||||
|
name: "Get p2pool Release Tag"
|
||||||
|
id: get_tag
|
||||||
|
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
|
||||||
@@ -35,18 +39,18 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
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 }}
|
||||||
${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
||||||
|
${{ secrets.DOCKER_USERNAME }}/p2pool:${{ steps.get_tag.outputs.tag }}
|
||||||
labels: |
|
labels: |
|
||||||
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 }}/p2pool:latest
|
|
||||||
cache-to: type=inline
|
|
||||||
-
|
-
|
||||||
name: Scan new image and output results
|
name: Scan new image and output results
|
||||||
uses: Azure/container-scan@v0
|
uses: Azure/container-scan@v0
|
||||||
with:
|
with:
|
||||||
image-name: ${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
image-name: ${{ secrets.DOCKER_USERNAME }}/p2pool:${{ steps.get_tag.outputs.tag }}
|
||||||
severity-threshold: HIGH
|
severity-threshold: HIGH
|
||||||
-
|
-
|
||||||
name: Image digest
|
name: Image digest
|
||||||
|
|||||||
17
Dockerfile
17
Dockerfile
@@ -1,10 +1,11 @@
|
|||||||
|
ARG P2POOL_BRANCH=v1.1
|
||||||
|
|
||||||
# Select Ubuntu 20.04LTS for the build image base
|
# Select Ubuntu 20.04LTS for the build image base
|
||||||
FROM ubuntu:20.04 as build
|
FROM ubuntu:20.04 as build
|
||||||
LABEL author="sethsimmons@pm.me" \
|
LABEL author="sethforprivacy@protonmail.com" \
|
||||||
maintainer="sethsimmons@pm.me"
|
maintainer="sethforprivacy@protonmail.com"
|
||||||
|
|
||||||
# Dependency list from https://github.com/monero-project/monero#compiling-monero-from-source
|
# Dependency list from https://github.com/SChernykh/p2pool#ubuntu-2004
|
||||||
# Added DEBIAN_FRONTEND=noninteractive to workaround tzdata prompt on installation
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get upgrade -y \
|
&& apt-get upgrade -y \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends git \
|
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends git \
|
||||||
@@ -18,13 +19,13 @@ ENV CXXFLAGS='-fPIC'
|
|||||||
ENV USE_SINGLE_BUILDDIR 1
|
ENV USE_SINGLE_BUILDDIR 1
|
||||||
ENV BOOST_DEBUG 1
|
ENV BOOST_DEBUG 1
|
||||||
|
|
||||||
# Switch to Monero source directory
|
# Switch to p2pool source directory
|
||||||
WORKDIR /p2pool
|
WORKDIR /p2pool
|
||||||
|
|
||||||
# Git pull Monero source at specified tag/branch
|
# Git pull p2pool source at specified tag/branch
|
||||||
RUN git clone --recursive https://github.com/SChernykh/p2pool .
|
RUN git clone --recursive --branch ${P2POOL_BRANCH} https://github.com/SChernykh/p2pool .
|
||||||
|
|
||||||
# Make static Monero binaries
|
# Make static p2pool binary
|
||||||
ARG NPROC
|
ARG NPROC
|
||||||
RUN test -z "$NPROC" && nproc > /nproc || echo -n "$NPROC" > /nproc && mkdir build && cd build && cmake .. && make -j"$(cat /nproc)"
|
RUN test -z "$NPROC" && nproc > /nproc || echo -n "$NPROC" > /nproc && mkdir build && cd build && cmake .. && make -j"$(cat /nproc)"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user