remove unused curl package, busybox provides wget if a http client is… #96
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@v4 | |
- 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 version | |
run: docker compose version | |
- name: Validate docker-compose.yml | |
run: docker compose -f docker-compose.yml config | |
- name: Validate docker-compose_isolated_httpd.yml | |
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@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DHUB_USERNAME }} | |
password: ${{ secrets.DHUB_TOKEN }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
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@v5 | |
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 }} |