Skip to content

Commit

Permalink
fix: docker build action
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Kopeček committed Nov 27, 2023
1 parent d38d1aa commit 70e42fc
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,24 @@ jobs:
name: Build Docker Image
runs-on: ubuntu-latest
steps:
- name: Checkout the updated source code
uses: actions/checkout@v3

- name: Checkout current repository
uses: actions/checkout@master

- name: Enable docker layer caching
uses: satackey/[email protected]

- name: Build the Docker image
run: docker build . --tag otevrenadatamfcr/opendata-portal

- name: Login to DockerHub
run: docker login --username="${{secrets.DOCKER_USERNAME}}" --password="${{secrets.DOCKER_PASSWORD}}"

- name: Push to DockerHub
run: docker push otevrenadatamfcr/opendata-portal
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to registry
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build image and push it to DockerHub
uses: docker/build-push-action@v4
with:
build-args: NG_CONFIGURATION=production
push: true
context: .
tags: "otevrenadatamfcr/opendata-portal:latest"
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 70e42fc

Please sign in to comment.