Skip to content

Commit

Permalink
chore(ci): switch from ghcr to dockerhub (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
notnmeyer authored Oct 19, 2023
1 parent 64a057a commit 6312a17
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ jobs:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: ghcr.io/notnmeyer/mockpi:latest
tags: docker.io/notnmeyer/mockpi:latest
20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
mockpi is a tool for faking APIs. it responds to all methods and endpoints, optionally including a response body provided in the request as the `x-response-json` header.

```shell
➜ curl -s -X POST -H 'x-response-json:{"id":0,"name":"nate"}' -d '{"name
":"nate"}' localhost:8080/users/create| jq .
{
"id": 0,
"name": "nate"
}
➜ curl -i -s -X POST -H 'x-response-json:{"id":0,"name":"nate"}' -d '{"name":"nate"}' localhost:8080/users/create
HTTP/1.1 200 OK
Date: Thu, 19 Oct 2023 04:14:33 GMT
Content-Length: 22
Content-Type: text/plain; charset=utf-8

{"id":0,"name":"nate"}
```


Expand All @@ -20,10 +21,5 @@ mockpi is a tool for faking APIs. it responds to all methods and endpoints, opti

```shell
docker buildx create --use

# local
docker buildx build --platform linux/amd64 -t ghcr.io/mockpi:latest . --load

# push
docker buildx build --platform linux/amd64 -t ghcr.io/mockpi:latest . --push
docker buildx build --platform linux/amd64 -t mockpi:latest . --load
```

0 comments on commit 6312a17

Please sign in to comment.