Skip to content

chore: Commit changes #13

chore: Commit changes

chore: Commit changes #13

Workflow file for this run

name: Check for new releases and build Docker images
on:
schedule:
- cron: "0 0 * * *" # Every day at midnight
workflow_dispatch:
# TODO: For debug and development only
push:
branches:
- main
env:
REGISTRY: imbios
PLATFORMS: linux/amd64,linux/arm64
VERSIONS: 16,18,20
TYPES: alpine,debian-slim,debian
jobs:
check-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install jq
run: sudo apt-get install jq
- name: Check for new releases in nodejs/node
run: ./check-new-release.sh nodejs/node nodejs
- name: Check for new releases in oven-sh/bun
if: env.nodejs-new-release == 'false'
run: ./check-new-release.sh oven-sh/bun bun
- name: Determine if any new releases
if: env.nodejs-new-release == 'true' || env.bun-new-release == 'true'
run: echo "any-new-release=$(if [[ '${{ env.nodejs-new-release }}' == 'true' || '${{ env.bun-new-release }}' == 'true' ]]; then echo 'true'; else echo 'false'; fi)" >> "$GITHUB_ENV"
- name: Commit changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -A
git diff-index --quiet HEAD || git commit -m "Update blog posts"
- name: Pull changes
run: git pull -r
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Docker Buildx
if: env.any-new-release == 'true'
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: env.any-new-release == 'true'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker images
if: env.any-new-release == 'true'
run: ./build-all.sh
env:
REGISTRY: ${{ env.REGISTRY }}
PLATFORMS: ${{ env.PLATFORMS }}
VERSIONS: ${{ env.VERSIONS }}
TYPES: ${{ env.TYPES }}