Skip to content

Commit 3726326

Browse files
authored
Merge pull request #73 from danner26/workflow-updates
Adding back workflows
2 parents 04653ae + ad4ad1c commit 3726326

File tree

2 files changed

+80
-75
lines changed

2 files changed

+80
-75
lines changed

.github/workflows/docker.yml

Lines changed: 58 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,60 @@
1-
# ---
2-
# name: ci
1+
---
2+
name: ci
33

4-
# on:
5-
# push:
6-
# branches:
7-
# - 'master'
8-
# - 'main'
9-
# pull_request:
10-
# branches:
11-
# - 'master'
12-
# - 'main'
13-
# workflow_dispatch:
14-
# release:
15-
# types: [published, edited]
4+
on:
5+
push:
6+
branches:
7+
- 'master'
8+
- 'main'
9+
pull_request:
10+
branches:
11+
- 'master'
12+
- 'main'
13+
workflow_dispatch:
14+
release:
15+
types: [published, edited]
1616

17-
# jobs:
18-
# build-and-push-images:
19-
# runs-on: ubuntu-latest
20-
# steps:
21-
# -
22-
# name: Checkout
23-
# uses: actions/checkout@v2
24-
# -
25-
# name: Docker meta
26-
# id: meta
27-
# uses: docker/metadata-action@v3
28-
# with:
29-
# images: ghcr.io/netbox-community/Netbox-Device-Type-Library-Import
30-
# tags: |
31-
# type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
32-
# type=ref,event=branch
33-
# type=ref,event=pr
34-
# type=semver,pattern={{version}}
35-
# type=semver,pattern={{major}}
36-
# type=semver,pattern={{major}}.{{minor}}
37-
# - name: Set up QEMU
38-
# uses: docker/setup-qemu-action@v1
39-
# - name: Set up Docker Buildx
40-
# uses: docker/setup-buildx-action@v1
41-
# - name: Login to GitHub Container Registry
42-
# if: github.event_name != 'pull_request'
43-
# uses: docker/login-action@v1
44-
# with:
45-
# registry: ghcr.io
46-
# username: ${{ github.repository_owner }}
47-
# password: ${{ secrets.GITHUB_TOKEN }}
48-
# - name: Build and push
49-
# uses: docker/build-push-action@v2
50-
# with:
51-
# context: .
52-
# push: ${{ github.event_name != 'pull_request' }}
53-
# platforms: linux/amd64
54-
# tags: ${{ steps.meta.outputs.tags }}
55-
# labels: ${{ steps.meta.outputs.labels }}
17+
jobs:
18+
build-and-push-images:
19+
runs-on: ubuntu-latest
20+
steps:
21+
-
22+
name: Checkout
23+
uses: actions/checkout@v2
24+
-
25+
name: Docker meta
26+
id: meta
27+
uses: docker/metadata-action@v3
28+
with:
29+
images: |
30+
ghcr.io/minitriga/Netbox-Device-Type-Library-Import
31+
tags: |
32+
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
33+
type=ref,event=branch
34+
type=ref,event=pr
35+
type=semver,pattern={{version}}
36+
type=semver,pattern={{major}}
37+
type=semver,pattern={{major}}.{{minor}}
38+
-
39+
name: Set up QEMU
40+
uses: docker/setup-qemu-action@v1
41+
-
42+
name: Set up Docker Buildx
43+
uses: docker/setup-buildx-action@v1
44+
-
45+
name: Login to GitHub Container Registry
46+
if: github.event_name != 'pull_request'
47+
uses: docker/login-action@v1
48+
with:
49+
registry: ghcr.io
50+
username: ${{ github.repository_owner }}
51+
password: ${{ secrets.GITHUB_TOKEN }}
52+
-
53+
name: Build and push
54+
uses: docker/build-push-action@v2
55+
with:
56+
context: .
57+
push: ${{ github.event_name != 'pull_request' }}
58+
platforms: linux/amd64
59+
tags: ${{ steps.meta.outputs.tags }}
60+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/stale.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
---
2-
# close-stale-issues (https://github.com/marketplace/actions/close-stale-issues)
3-
# name: Close stale PRs
4-
# on: # yamllint disable-line rule:truthy
5-
# schedule:
6-
# - cron: 0 4 * * *
2+
#close-stale-issues (https://github.com/marketplace/actions/close-stale-issues)
3+
name: Close stale PRs
4+
on: # yamllint disable-line rule:truthy
5+
schedule:
6+
- cron: 0 4 * * *
77

8-
# jobs:
9-
# stale:
10-
# runs-on: ubuntu-latest
11-
# steps:
12-
# - uses: actions/stale@v5
13-
# with:
14-
# close-pr-message: >
15-
# This PR has been automatically closed due to lack of activity.
16-
# days-before-stale: 30
17-
# days-before-close: 7
18-
# operations-per-run: 100
19-
# remove-stale-when-updated: false
20-
# stale-pr-label: stale
21-
# stale-pr-message: >
22-
# This PR has been automatically marked as stale because it has not
23-
# had recent activity. It will be closed automatically if no further
24-
# progress is made.
8+
jobs:
9+
stale:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/stale@v5
13+
with:
14+
close-pr-message: >
15+
This PR has been automatically closed due to lack of activity.
16+
days-before-stale: 30
17+
days-before-close: 7
18+
operations-per-run: 100
19+
remove-stale-when-updated: false
20+
stale-pr-label: stale
21+
stale-pr-message: >
22+
This PR has been automatically marked as stale because it has not
23+
had recent activity. It will be closed automatically if no further
24+
progress is made.

0 commit comments

Comments
 (0)