Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Commit

Permalink
Merge master into dependabot/npm_and_yarn/master/eslint-plugin-import…
Browse files Browse the repository at this point in the history
…-2.22.1
  • Loading branch information
github-actions[bot] authored Oct 8, 2020
2 parents 7b24f46 + 6207dc4 commit 29bb9f2
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 43 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,15 @@ updates:
labels:
- 'dev-dependencies'
- 'automerge'

- package-ecosystem: 'docker' # See documentation for possible values
directory: '/docker'
schedule:
interval: 'daily'
labels:
- 'automerge'

- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
20 changes: 20 additions & 0 deletions .github/workflows/close-stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Close stale issues'
on:
schedule:
- cron: '0 0 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label'
close-issue-message: 'This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.'
stale-pr-message: 'This pull-request is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this pull-request entirely you can add the no-stale label'
close-pr-message: 'This pull-request is now closed due to inactivity, you can of course reopen or reference this pull-request if you see fit.'
days-before-stale: 90
days-before-close: 5
exempt-issue-labels: 'no-stale,enhancement'
exempt-pr-labels: 'no-stale'
72 changes: 29 additions & 43 deletions .github/workflows/dockerbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,51 +14,37 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: crazy-max/ghaction-docker-buildx@v3

- name: Prepare
id: prepare
run: |
DOCKER_IMAGE=robertslando/zwave2mqtt
DOCKER_PLATFORMS=linux/arm64,linux/amd64,linux/arm/v6,linux/arm/v7,linux/386
echo ::set-output name=docker_image::${DOCKER_IMAGE}
echo ::set-output name=docker_platforms::${DOCKER_PLATFORMS} \
- name: Just build on PR
if: ${{ github.event_name == 'pull_request' }}
run: |
docker buildx build \
-f docker/Dockerfile \
--platform ${{ steps.prepare.outputs.docker_platforms }} \
-t ${{ steps.prepare.outputs.docker_image }}:dev \
.

- uses: docker/setup-buildx-action@v1
- uses: docker/setup-qemu-action@v1
- name: Login to dockerhub
if: ${{ github.event_name != 'pull_request' }}
run: |
docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Dev
if: ${{ github.ref == 'refs/heads/master'}}
run: |
docker buildx build \
-f docker/Dockerfile \
--platform ${{ steps.prepare.outputs.docker_platforms }} \
-t ${{ steps.prepare.outputs.docker_image }}:dev \
--push \
.
- name: Latest & tag
if: ${{ github.event_name == 'release' }}
- name: Prepare
run: |
docker buildx build \
-f docker/Dockerfile \
--platform ${{ steps.prepare.outputs.docker_platforms }} \
-t ${{ steps.prepare.outputs.docker_image }}:$(echo ${GITHUB_REF} | sed "s/refs\/tags\/v//") \
-t ${{ steps.prepare.outputs.docker_image }}:latest \
--push \
.
DOCKER_REPO=robertslando/zwave2mqtt
if [ "$GITHUB_REF" == "refs/heads/master" ]; then
TAGS="${DOCKER_REPO}:dev\n"
fi
if [ "$GITHUB_EVENT_NAME" == "release" ]; then
TAGS="${TAGS}${DOCKER_REPO}:latest\n"
TAGS="${TAGS}${DOCKER_REPO}:$(echo ${GITHUB_REF} | sed "s/refs\/tags\/v//")\n"
fi
TAGS="${TAGS}${DOCKER_REPO}:sha-${GITHUB_SHA}"
echo TAGS="${TAGS}" >> $GITHUB_ENV
echo DOCKER_REPO="${DOCKER_REPO}" >> $GITHUB_ENV
- name: build+push
uses: docker/build-push-action@v2
with:
cache-from: type=registry,ref=${{ env.DOCKER_REPO }}:sha-${{ env.GITHUB_SHA }}
platforms: linux/arm64,linux/amd64,linux/arm/v6,linux/arm/v7,linux/386
file: docker/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.TAGS }}

0 comments on commit 29bb9f2

Please sign in to comment.