Bump node-red from 3.0.2 to 3.1.0 #297
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 🛑 Think twice before editing this file! 🛑 | |
# ⚠️ This file is maintained via https://github.com/IanStorm/dev-settings-sync. ⚠️ | |
# | |
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
name: Docker | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 22 * * 5' # weekly, i.e. every Friday at 10pm | |
env: | |
DOCKERHUB_USERNAME: ianstorm | |
jobs: | |
docker-job: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log into registry | |
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u $DOCKERHUB_USERNAME --password-stdin | |
- name: Docker buildx and push | |
run: | | |
IMAGE_ID=${{ github.repository }} | |
# Change all uppercase to lowercase | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
# Strip git ref prefix from version | |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
# Strip "v" prefix from tag name | |
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | |
# Use Docker `latest` tag convention | |
[ "$VERSION" == "main" ] && VERSION=latest | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker buildx build \ | |
--platform linux/amd64,linux/arm/v7 \ | |
--output "type=image,push=true" \ | |
--tag $IMAGE_ID:$VERSION \ | |
--file Dockerfile \ | |
. |