Skip to content

Commit

Permalink
chore(ci): build/publish docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
Hagith committed Apr 11, 2024
1 parent c2d3033 commit 99a7e84
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish Docker image

on:
push:
tags: [ '*' ]
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
docker:
name: Publish Docker
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v5
id: meta
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"start": "docker-compose up -d",
"stop": "docker-compose stop",
"down": "docker-compose down",
"build": "docker-compose build",
"sqlcmd": "docker-compose exec server sqlcmd -U sa",
"build": "docker build . -t ghcr.io/sysdynetechnologies/mssql-server:latest",
"push": "docker push ghcr.io/sysdynetechnologies/mssql-server:latest",
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down

0 comments on commit 99a7e84

Please sign in to comment.