diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index f05dfc6..3450779 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -69,7 +69,7 @@ jobs: - name: Log into Docker Hub id: docker-hub - if: github.event_name != 'pull_request' + if: ${{ github.event_name != 'pull_request' && github.event_name != 'workflow_dispatch' }} uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} @@ -82,13 +82,14 @@ jobs: uses: docker/metadata-action@v5 with: images: | - ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE }} tags: | type=ref,event=branch,enable=${{ github.ref_name != 'main' }} type=ref,event=tag - type=raw,enable=${{ !startsWith(github.ref_name, 'dev') }},value=latest + type=raw,enable=${{ github.event_name != 'schedule' && !startsWith(github.ref_name, 'dev') }},value=latest type=raw,enable=${{ github.event_name != 'schedule' && !startsWith(github.ref_name, 'dev') }},priority=1000,value=${{ needs.get-version.outputs.pkg-version }} + type=raw,enable=${{ github.event_name == 'schedule' }},value=nightly # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b83b05..7747a51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +## 0.13.8 + +### Changed + +- Simplify 'connection type' option check +- Introduce 'nightly' tag for regular updates to base OS and binary dependencies to ensure vulnerabilities are addressed in between releases + - Reserve 'latest' tag for customary latest release + ## 0.13.7 ### Changed diff --git a/Cargo.toml b/Cargo.toml index a07941f..f34555a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "docker-autoheal" -version = "0.13.7" +version = "0.13.8" authors = ["Travis M Knight"] license = "GPL-3.0" description = "A cross-platform tool to monitor and remediate unhealthy Docker containers" diff --git a/src/inquire/options.rs b/src/inquire/options.rs index 388be01..a25990e 100644 --- a/src/inquire/options.rs +++ b/src/inquire/options.rs @@ -91,7 +91,11 @@ pub fn get_opts(args: Vec) -> OptionsList { "", ); opts.optopt("w", "webhook-url", "The webhook url", ""); - opts.optflag("L", "log-persist", "Enable external logging and reporting of historical data"); + opts.optflag( + "L", + "log-persist", + "Enable external logging and reporting of historical data", + ); opts.optopt( "P", "post-action", @@ -119,20 +123,17 @@ pub fn get_opts(args: Vec) -> OptionsList { } // Ensure acceptable connection type arguments - match matches.opt_str("c").is_some() { - true => { - let opt_connection_type = matches.opt_str("c").unwrap(); - match ALLOWED_CONNECTION_TYPES.contains(&opt_connection_type.as_str()) { - true => {} - false => { - println!("Unexpected connection-type: {}", opt_connection_type); - println!("{}", opts.usage(&program)); - std::process::exit(1); - } + if matches.opt_str("c").is_some() { + let opt_connection_type = matches.opt_str("c").unwrap(); + match ALLOWED_CONNECTION_TYPES.contains(&opt_connection_type.as_str()) { + true => {} + false => { + println!("Unexpected connection-type: {}", opt_connection_type); + println!("{}", opts.usage(&program)); + std::process::exit(1); } } - false => {} - }; + } OptionsList { apprise_url: matches.opt_str("a"),