Skip to content

Commit

Permalink
CI on branch main
Browse files Browse the repository at this point in the history
  • Loading branch information
frafra committed Aug 15, 2024
1 parent ae2c504 commit 2905e0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Docker

on:
push:
branches: [ 'master', 'nina' ]
branches: [ 'main' ]
pull_request:
branches: [ 'master' ]
branches: [ 'main' ]

env:
REGISTRY: ghcr.io
Expand All @@ -21,32 +21,28 @@ jobs:
steps:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
-
name: Checkout
uses: actions/checkout@v3
with:
lfs: true
- # https://github.com/actions/checkout/issues/270
name: Check out LFS objects
run: git lfs pull
uses: actions/checkout@v4
-
name: Login to registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
logout: false
-
name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
-
name: Build and push container
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
x-common: &common
image: ghcr.io/ninanor/bachelor-oppgave-nina:nina
image: ghcr.io/ninanor/fisk-ai:main
build: .
deploy:
resources:
Expand Down

0 comments on commit 2905e0b

Please sign in to comment.