Skip to content

Commit 6b97b26

Browse files
committed
Added new container build workflow
1 parent c1d5cfa commit 6b97b26

File tree

3 files changed

+37
-18
lines changed

3 files changed

+37
-18
lines changed

.drone.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/docker.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build & publish container image
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * SAT" # every saturday at midnight
7+
push:
8+
branches:
9+
- "main"
10+
11+
jobs:
12+
build-image:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v3
21+
22+
- name: Log in to the Container registry
23+
uses: docker/login-action@v2
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Build and push Docker image
30+
uses: docker/build-push-action@v3
31+
with:
32+
push: true
33+
tags: ghcr.io/${{ github.repository }}:latest

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
### Initial project setup
66

77
```bash
8-
git clone git@git.tiepy.dev:zxplay/zxplay-api-z88dk.git
8+
git clone https://github.com/stever/zxplay-api-z88dk.git
99
cd zxplay-api-z88dk/
1010
virtualenv venv
1111
source ./venv/bin/activate
@@ -21,8 +21,8 @@ uvicorn app.main:app --reload
2121
## Docker Build & Push
2222

2323
```bash
24-
docker build -t steverobertson/zxplay-api-z88dk .
25-
docker push steverobertson/zxplay-api-z88dk
24+
docker build -t ghcr.io/stever/zxplay-api-z88dk .
25+
docker push ghcr.io/stever/zxplay-api-z88dk
2626
```
2727

2828
## Run Locally
@@ -32,7 +32,7 @@ docker run \
3232
--publish=80:8000 \
3333
--detach=true \
3434
--name=zxplay-api-z88dk \
35-
steverobertson/zxplay-api-z88dk
35+
ghcr.io/stever/zxplay-api-z88dk
3636
```
3737

3838
## Hasura Deployment Configuration

0 commit comments

Comments
 (0)