mirror of
https://github.com/sethforprivacy/p2pool-docker.git
synced 2025-12-06 15:52:37 -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:
|
||||
schedule:
|
||||
- cron: "0 12 * * *" # Run every day at noon.
|
||||
- cron: "0 12 * * 1" # Run every Monday at noon.
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
rebuild-container:
|
||||
@@ -26,6 +26,10 @@ jobs:
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: "Checkout repository"
|
||||
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
|
||||
id: docker_build
|
||||
@@ -34,7 +38,9 @@ jobs:
|
||||
push: true
|
||||
tags: |
|
||||
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:${{ steps.get_tag.outputs.tag }}
|
||||
labels: |
|
||||
org.opencontainers.image.source=${{ github.event.repository.html_url }}
|
||||
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
|
||||
@@ -43,7 +49,7 @@ jobs:
|
||||
name: Scan new image and output results
|
||||
uses: Azure/container-scan@v0
|
||||
with:
|
||||
image-name: ${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
||||
image-name: ${{ secrets.DOCKER_USERNAME }}/p2pool:${{ steps.get_tag.outputs.tag }}
|
||||
severity-threshold: HIGH
|
||||
-
|
||||
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 }}
|
||||
- name: "Checkout repository"
|
||||
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
|
||||
id: docker_build
|
||||
@@ -35,18 +39,18 @@ jobs:
|
||||
push: true
|
||||
tags: |
|
||||
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:${{ steps.get_tag.outputs.tag }}
|
||||
labels: |
|
||||
org.opencontainers.image.source=${{ github.event.repository.html_url }}
|
||||
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
|
||||
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
|
||||
uses: Azure/container-scan@v0
|
||||
with:
|
||||
image-name: ${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
||||
image-name: ${{ secrets.DOCKER_USERNAME }}/p2pool:${{ steps.get_tag.outputs.tag }}
|
||||
severity-threshold: HIGH
|
||||
-
|
||||
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
|
||||
FROM ubuntu:20.04 as build
|
||||
LABEL author="sethsimmons@pm.me" \
|
||||
maintainer="sethsimmons@pm.me"
|
||||
LABEL author="sethforprivacy@protonmail.com" \
|
||||
maintainer="sethforprivacy@protonmail.com"
|
||||
|
||||
# Dependency list from https://github.com/monero-project/monero#compiling-monero-from-source
|
||||
# Added DEBIAN_FRONTEND=noninteractive to workaround tzdata prompt on installation
|
||||
# Dependency list from https://github.com/SChernykh/p2pool#ubuntu-2004
|
||||
RUN apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends git \
|
||||
@@ -18,13 +19,13 @@ ENV CXXFLAGS='-fPIC'
|
||||
ENV USE_SINGLE_BUILDDIR 1
|
||||
ENV BOOST_DEBUG 1
|
||||
|
||||
# Switch to Monero source directory
|
||||
# Switch to p2pool source directory
|
||||
WORKDIR /p2pool
|
||||
|
||||
# Git pull Monero source at specified tag/branch
|
||||
RUN git clone --recursive https://github.com/SChernykh/p2pool .
|
||||
# Git pull p2pool source at specified tag/branch
|
||||
RUN git clone --recursive --branch ${P2POOL_BRANCH} https://github.com/SChernykh/p2pool .
|
||||
|
||||
# Make static Monero binaries
|
||||
# Make static p2pool binary
|
||||
ARG 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