Skip to content

Commit

Permalink
Merge pull request #6 from benzlokzik/dev
Browse files Browse the repository at this point in the history
Added workflow for publishing Docker container
  • Loading branch information
benzlokzik committed Dec 16, 2023
2 parents e6eb4e5 + 039e873 commit ec88932
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/publish-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish Docker container

on:
release:
types: [ published ]

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v2

- name: Log in to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push Docker Image
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/${{ github.repository }}/myapp:${{ github.ref_name }}
39 changes: 38 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

Simple http Fahrenheit/Celsius/Kelvin converter using [actix-web](https://actix.rs/).


---

> [!NOTE]\
Expand All @@ -28,3 +27,41 @@ Via Docker:
docker build -t fahrenheit-celsius-converter .
docker run -p 8080:8080 fahrenheit-celsius-converter
```

## API

### Convert Fahrenheit to Celsius

```bash
curl -X GET "http://localhost:8080/convert/f_to_c/100"
```

### Convert Celsius to Fahrenheit

```bash
curl -X GET "http://localhost:8080/convert/c_to_f/100"
```

### Convert Fahrenheit to Kelvin

```bash
curl -X GET "http://localhost:8080/convert/f_to_k/100"
```

### Convert Kelvin to Fahrenheit

```bash
curl -X GET "http://localhost:8080/convert/k_to_f/100"
```

### Convert Celsius to Kelvin

```bash
curl -X GET "http://localhost:8080/convert/c_to_k/100"
```

### Convert Kelvin to Celsius

```bash
curl -X GET "http://localhost:8080/convert/k_to_c/100"
```

0 comments on commit ec88932

Please sign in to comment.