add support for configuring indexshowninterfaces and indexhiddeninter… #85
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: release | |
on: | |
push: | |
branches: | |
- 'master' | |
workflow_dispatch: | |
schedule: | |
# one scheduled build on the first day of every month at 3:42 | |
- cron: '42 3 1 * *' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check spelling | |
uses: crate-ci/typos@master | |
- name: Run ShellCheck | |
uses: ludeeus/action-shellcheck@master | |
- name: Run Perl::Critic | |
uses: natanlao/perl-critic-action@v1.1 | |
- name: Show docker-compose (v1) version | |
run: docker-compose version | |
- name: Show docker compose (v2) version | |
run: docker compose version | |
- name: Validate docker-compose.yml (v1) | |
run: docker-compose -f docker-compose.yml config | |
- name: Validate docker-compose_isolated_httpd.yml (v1) | |
run: docker-compose -f docker-compose_isolated_httpd.yml config | |
- name: Validate docker-compose.yml (v2) | |
run: docker compose -f docker-compose.yml config | |
- name: Validate docker-compose_isolated_httpd.yml (v2) | |
run: docker compose -f docker-compose_isolated_httpd.yml config | |
docker: | |
needs: lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DHUB_USERNAME }} | |
password: ${{ secrets.DHUB_TOKEN }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get release information | |
run: | | |
curl --silent --fail --fail-early $GITHUB_API_URL/repos/vergoh/vnstat/releases/latest | \ | |
jq -r .tag_name | \ | |
sed -e 's:[^0-9.]::g' -e 's:^:latest_release=:g' >> $GITHUB_ENV | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v4 | |
with: | |
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 | |
push: true | |
tags: | | |
vergoh/vnstat:latest | |
vergoh/vnstat:${{ env.latest_release }} | |
ghcr.io/${{ github.repository_owner }}/vnstat:latest | |
ghcr.io/${{ github.repository_owner }}/vnstat:${{ env.latest_release }} | |
labels: | | |
org.opencontainers.image.version=${{ env.latest_release }} | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |