Skip to content

Commit

Permalink
Merge pull request #112 from tmknight/dev/0.13.8
Browse files Browse the repository at this point in the history
v0.13.8
  • Loading branch information
tmknight authored Dec 11, 2024
2 parents ce21ebc + 8eff25a commit 87a7695
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 17 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
27 changes: 14 additions & 13 deletions src/inquire/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ pub fn get_opts(args: Vec<String>) -> OptionsList {
"<TCP_TIMEOUT>",
);
opts.optopt("w", "webhook-url", "The webhook url", "<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",
Expand Down Expand Up @@ -119,20 +123,17 @@ pub fn get_opts(args: Vec<String>) -> 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"),
Expand Down

0 comments on commit 87a7695

Please sign in to comment.