Skip to content

Commit

Permalink
ci: fix docker build for dependabot
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin committed Oct 30, 2023
1 parent e082857 commit 011e80f
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ concurrency:

env:
package-name: monica-next
registry: ghcr.io

jobs:
docker-run:
Expand All @@ -26,6 +27,10 @@ jobs:
strategy:
fail-fast: false

permissions:
contents: read
packages: write

steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -36,7 +41,7 @@ jobs:
id: docker_meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ env.package-name }}
images: ${{ env.registry }}/${{ github.repository_owner }}/${{ env.package-name }}
tags: |
type=schedule
type=ref,event=branch
Expand All @@ -56,9 +61,9 @@ jobs:
- name: Login to GitHub container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.CR_USER }}
password: ${{ secrets.CR_PAT }}
registry: ${{ env.registry }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Configure
- name: Configure variables
Expand All @@ -71,7 +76,7 @@ jobs:
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ env.package-name }}:main
cache-from: type=registry,ref=${{ env.registry }}/${{ github.repository_owner }}/${{ env.package-name }}:main
labels: ${{ steps.docker_meta.outputs.labels }}
file: scripts/docker/Dockerfile
context: .
Expand All @@ -85,7 +90,7 @@ jobs:
uses: vlaurin/[email protected]
if: github.event_name != 'pull_request'
with:
token: ${{ secrets.CR_PAT }}
token: ${{ secrets.GITHUB_TOKEN }}
organization: ${{ github.repository_owner }}
container: ${{ env.package-name }}
keep-younger-than: 15
Expand Down

0 comments on commit 011e80f

Please sign in to comment.