Skip to content

Commit

Permalink
Merge pull request #3 from aviemet/docker
Browse files Browse the repository at this point in the history
Docker
  • Loading branch information
aviemet authored Jul 15, 2024
2 parents 49128a9 + 889b521 commit 10757b0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,22 @@ jobs:
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
run: |
docker-compose -f docker-compose.yml build
docker compose -f docker-compose.yml build
- name: Authenticate to GitHub Container Registry
run: echo ${{ secrets.GH_AUTH_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
# - name: Authenticate to GitHub Container Registry
# run: echo ${{ secrets.GH_AUTH_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_AUTH_TOKEN }}

- name: Push Docker Image to GitHub Packages
run: |
NEW_VERSION=$(node -p "require('./package.json').version")
docker tag osc_controller ghcr.io/${{ github.repository_owner }}/osc_controller:${NEW_VERSION}
docker-compose push ghcr.io/${{ github.repository_owner }}/osc_controller:${NEW_VERSION}
docker push ghcr.io/${{ github.repository_owner }}/osc_controller:${NEW_VERSION}
env:
GHCR_PAT: ${{ secrets.GH_AUTH_TOKEN }}
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.9'

services:
postgres:
image: postgres:15.4-alpine
Expand Down

0 comments on commit 10757b0

Please sign in to comment.