Compare commits
No commits in common. "6541ab6847875e0ec132cea20c4bffa1213f3f43" and "33d860cb488e8ace9354cc9fede4f4e721fdbd1a" have entirely different histories.
6541ab6847
...
33d860cb48
3 changed files with 10 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
||||||
name: Auto Build Monero Node Docker Container
|
name: Auto Build Monero Node Docker Container
|
||||||
enable-email-notifications: true
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
@ -17,22 +17,19 @@ jobs:
|
||||||
COMMIT_AUTHOR_NAME: "forgejo-runner"
|
COMMIT_AUTHOR_NAME: "forgejo-runner"
|
||||||
COMMIT_AUTHOR_EMAIL: "forgejo-runner@shork.ch"
|
COMMIT_AUTHOR_EMAIL: "forgejo-runner@shork.ch"
|
||||||
COMMIT_MESSAGE: "Update build metadata"
|
COMMIT_MESSAGE: "Update build metadata"
|
||||||
GET_NEWEST_VERSION_CMD: "curl https://api.github.com/repos/monero-project/monero/tags | jq -r .[0].name"
|
|
||||||
GIT_REPO_URL: "https://github.com/monero-project/monero"
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
shell: sh
|
shell: sh
|
||||||
run: |
|
run: |
|
||||||
echo "Run because of ${{ github.event_name }}"
|
apk add --no-cache git bash jq nodejs npm curl
|
||||||
apk add --no-cache git nodejs npm bash sed curl jq
|
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Get latest package version
|
- name: Get latest package version
|
||||||
id: check
|
id: check
|
||||||
run: |
|
run: |
|
||||||
newest_version=$(eval "$GET_NEWEST_VERSION_CMD")
|
newest_version=$(curl https://api.github.com/repos/monero-project/monero/releases/latest | jq -r .tag_name)
|
||||||
echo "NEWEST_VERSION=$newest_version" >> $GITHUB_ENV
|
echo "NEWEST_VERSION=$newest_version" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Determine if update is needed
|
- name: Determine if update is needed
|
||||||
|
@ -46,7 +43,7 @@ jobs:
|
||||||
current_day=$(( $(date +%s) / 86400 ))
|
current_day=$(( $(date +%s) / 86400 ))
|
||||||
|
|
||||||
update="false"
|
update="false"
|
||||||
if [ ${{ github.event_name }} == "workflow_dispatch" ] || [ "$last_version" != "$NEWEST_VERSION" ] || [ $((current_day - last_rebuild)) -gt 14 ]; then
|
if [ "$last_version" != "$NEWEST_VERSION" ] || [ $((current_day - last_rebuild)) -gt 14 ]; then
|
||||||
update="true"
|
update="true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -67,13 +64,14 @@ jobs:
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
if: env.UPDATE == 'true'
|
if: env.UPDATE == 'true'
|
||||||
run: |
|
run: |
|
||||||
git clone $GIT_REPO_URL ../$PACKAGE
|
git clone https://github.com/monero-project/monero ../monero
|
||||||
cd ../$PACKAGE
|
cd ../monero
|
||||||
git fetch --all --tags
|
git fetch --all --tags
|
||||||
git checkout tags/$NEWEST_VERSION
|
git checkout tags/$NEWEST_VERSION
|
||||||
docker build --build-arg NPROC=1 -t $DOCKER_REGISTRY/$REGISTRY_USER/docker-$PACKAGE:latest -t $DOCKER_REGISTRY/$REGISTRY_USER/docker-$PACKAGE:$NEWEST_VERSION .
|
docker build --build-arg NPROC=1 -t $DOCKER_REGISTRY/$REGISTRY_USER/docker-$PACKAGE:latest -t $DOCKER_REGISTRY/$REGISTRY_USER/docker-$PACKAGE:$NEWEST_VERSION .
|
||||||
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login $DOCKER_REGISTRY -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login $DOCKER_REGISTRY -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
||||||
docker push $DOCKER_REGISTRY/$REGISTRY_USER/docker-$PACKAGE:latest
|
docker push $DOCKER_REGISTRY/$REGISTRY_USER/docker-$PACKAGE:latest
|
||||||
|
cd
|
||||||
|
|
||||||
- name: Commit updated metadata
|
- name: Commit updated metadata
|
||||||
if: env.UPDATE == 'true'
|
if: env.UPDATE == 'true'
|
||||||
|
@ -83,5 +81,5 @@ jobs:
|
||||||
git config user.name "$COMMIT_AUTHOR_NAME"
|
git config user.name "$COMMIT_AUTHOR_NAME"
|
||||||
git config user.email "$COMMIT_AUTHOR_EMAIL"
|
git config user.email "$COMMIT_AUTHOR_EMAIL"
|
||||||
git add .last_version .last_rebuild
|
git add .last_version .last_rebuild
|
||||||
git commit -m "$COMMIT_MESSAGE" || echo "No commit"
|
git commit -m "$COMMIT_MESSAGE"
|
||||||
git push
|
git push
|
|
@ -1 +1 @@
|
||||||
20294
|
20283
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
v0.18.4.1
|
v0.18.4.0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue