Skip to content

Commit

Permalink
docekr runer
Browse files Browse the repository at this point in the history
  • Loading branch information
Alw3ys committed Mar 15, 2024
1 parent 603eb87 commit 036c591
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,15 @@ jobs:

cd:
needs: ci
runs-on: ubuntu-22.04
name: 'cd ${{ matrix.target }}'
strategy:
matrix:
include:
- os: ubuntu-latest
target: linux/amd64
- os: macos-latest-xlarge
target: linux/arm64
runs-on: ${{ matrix.os }}

steps:
- name: Checkout
Expand All @@ -57,12 +65,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker Build
uses: docker/build-push-action@v5
with:
Expand All @@ -73,6 +75,12 @@ jobs:
cache-to: type=gha,mode=max
load: true

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker Push
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/build-push-action@v5
Expand All @@ -93,4 +101,4 @@ jobs:
tags: |
doseiai/dosei
doseiai/dosei:${{ github.ref_name }}
cache-from: type=gha
cache-from: type=gha

0 comments on commit 036c591

Please sign in to comment.