This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
name: Build and Push Image
|
||||
on: [push]
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Log in to Gitea Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: gitea.nelson-household.com # Replace with your Gitea domain
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.RUNNER_TOKEN }}
|
||||
- name: Delete Old Images and Containers
|
||||
run: |
|
||||
docker rm $(docker ps -a -q -f "name=tcg-collectors-server")
|
||||
docker rmi $(docker images --format "{{.Repository}}:{{.Tag}}" | grep "tcg-collectors-server")
|
||||
- name: Build and Push Image
|
||||
run: |
|
||||
docker build -t gitea.nelson-household.com/Hard-at-Work/tcg-collectors-server/tcg-collectors-server:${{ github.sha }} .
|
||||
docker push gitea.nelson-household.com/Hard-at-Work/tcg-collectors-server/tcg-collectors-server:${{ github.sha }}
|
||||
+2
-1
@@ -8,7 +8,8 @@
|
||||
"dev": "nodemon app.js",
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"format": "prettier --config prettier.config.js --write ."
|
||||
"format": "prettier --config prettier.config.js --write .",
|
||||
"migrations": "node ./migrations/index.js"
|
||||
},
|
||||
"type": "module",
|
||||
"keywords": [
|
||||
|
||||
Reference in New Issue
Block a user