Custom #9
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
name: Custom | |
on: | |
# push: | |
# branches: | |
# - main | |
schedule: | |
- cron: "0 0 * * 0" # 每周日凌晨0点执行 | |
jobs: | |
Nautobot-Plugins: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 5 # 限制同时运行的任务数量 | |
matrix: | |
nautobot_version: | |
[ | |
latest, | |
latest-py3.12, | |
latest-py3.11, | |
latest-py3.10, | |
latest-py3.9, | |
latest-py3.8, | |
stable, | |
stable-py3.12, | |
stable-py3.11, | |
stable-py3.10, | |
stable-py3.9, | |
stable-py3.8, | |
2.4, | |
2.4-py3.12, | |
2.4-py3.11, | |
2.4-py3.10, | |
2.4-py3.9, | |
] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Cache Docker layers | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ matrix.nautobot_version }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push Nautobot image with plugins | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./packaging/docker/custom/Dockerfile.nautobot | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
build-args: | | |
NAUTOBOT_VERSION=${{ matrix.nautobot_version }} | |
tags: ${{ secrets.DOCKER_USERNAME }}/nautobot-plugins:${{ matrix.nautobot_version }} | |
push: true | |
Grafana-Plugins: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 5 # 限制同时运行的任务数量 | |
matrix: | |
nautobot_version: | |
[ | |
latest, | |
11.5.1, | |
11.5.0, | |
11.4.1, | |
11.4.0, | |
11.3.3, | |
11.3.2, | |
11.3.1, | |
11.3.0, | |
11.2.6, | |
11.2.5, | |
11.2.4, | |
11.2.3, | |
11.2.2, | |
11.2.1, | |
11.2.0, | |
11.1.11, | |
11.1.10, | |
11.1.9, | |
11.1.8, | |
11.1.7, | |
11.1.6, | |
11.1.5, | |
11.1.4, | |
11.1.3, | |
11.1.2, | |
11.1.1, | |
11.1.0, | |
11.0.10, | |
11.0.9, | |
11.0.8, | |
11.0.7, | |
11.0.6, | |
11.0.5, | |
11.0.4, | |
11.0.3, | |
11.0.2, | |
11.0.1, | |
11.0.0, | |
10.4.15, | |
10.4.14, | |
10.4.13, | |
10.4.12, | |
10.4.11, | |
10.4.10, | |
10.4.9, | |
10.4.8, | |
10.4.7, | |
10.4.6, | |
10.4.5, | |
10.4.4, | |
10.4.3, | |
10.4.2, | |
10.4.1, | |
10.4.0, | |
10.3.12, | |
10.3.11, | |
10.3.10, | |
10.3.9, | |
10.3.7, | |
10.3.6, | |
10.3.5, | |
10.3.4, | |
10.3.3, | |
10.3.1, | |
10.3.0, | |
10.2.9, | |
10.2.8, | |
10.2.7, | |
10.2.6, | |
10.2.5, | |
10.2.4, | |
10.2.3, | |
10.2.2, | |
10.2.1, | |
10.2.0, | |
10.1.10, | |
10.1.9, | |
10.1.8, | |
10.1.7, | |
10.1.6, | |
10.1.5, | |
10.1.4, | |
10.1.2, | |
10.1.1, | |
10.1.0, | |
10.0.13, | |
10.0.12, | |
10.0.11, | |
10.0.10, | |
10.0.9, | |
10.0.8, | |
10.0.6, | |
10.0.5, | |
10.0.4, | |
10.0.3, | |
10.0.2, | |
10.0.1, | |
10.0.0, | |
] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Cache Docker layers | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ matrix.nautobot_version }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push with plugins | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./packaging/docker/custom/Dockerfile.grafana | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
build-args: | | |
GRAFANA_VERSION=${{ matrix.nautobot_version }} | |
GF_INSTALL_PLUGINS=grafana-clock-panel,alexanderzobnin-zabbix-app,camptocamp-prometheus-alertmanager-datasource,grafana-opensearch-datasource,marcusolsson-csv-datasource,volkovlabs-grapi-datasource,marcusolsson-json-datasource,yesoreyeram-infinity-datasource | |
tags: | |
${{ secrets.DOCKER_USERNAME }}/grafana-plugins:${{ matrix.nautobot_version }} | |
${{ secrets.DOCKER_USERNAME }}/grafana-plugins:${{ github.sha }} | |
push: true |