docker stuff
This commit is contained in:
parent
e5c845a159
commit
75ab42ecb5
5 changed files with 53 additions and 8 deletions
29
.github/workflows/ci.yaml
vendored
Normal file
29
.github/workflows/ci.yaml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
name: "CI"
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
service: ["api", "tasks", "websocket"]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- run: |
|
||||
docker build . \
|
||||
--build-arg SERVICE=${{ matrix.service }} \
|
||||
-t ghcr.io/${{ github.repository }}/${{ matrix.service }}:${{ github.sha }}
|
||||
- run: |
|
||||
docker tag ghcr.io/${{ github.repository }}/${{ matrix.service }}:${{ github.sha }} \
|
||||
ghcr.io/${{ github.repository }}/${{ matrix.service }}:latest
|
||||
if: github.ref == 'refs/heads/main'
|
||||
- run: |
|
||||
docker push ghcr.io/${{ github.repository }}/${{ matrix.service }}
|
Loading…
Add table
Add a link
Reference in a new issue