From 65206ddf798a8f12db230cebb46838f63a2b46f9 Mon Sep 17 00:00:00 2001 From: Kilian Date: Mon, 24 Jun 2024 12:36:35 +0200 Subject: [PATCH] Update docker-image-api --- .github/workflows/docker-image-api.yml | 49 ++++++++++++-------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/.github/workflows/docker-image-api.yml b/.github/workflows/docker-image-api.yml index 9b2fd34..7fa4ac7 100644 --- a/.github/workflows/docker-image-api.yml +++ b/.github/workflows/docker-image-api.yml @@ -2,36 +2,33 @@ name: Docker Image API on: push: - branches: [ "main" ] + branches: ["main"] pull_request: - branches: [ "main" ] + branches: ["main"] jobs: - docker: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - 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 }} - - uses: benjlevesque/short-sha@v2.1 - id: short-sha - with: - length: 7 - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: "{{defaultContext}}:api" - push: true - tags: uugai/facialaccess-backend:${{ steps.short-sha.outputs.sha }} + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - 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 }} + - uses: benjlevesque/short-sha@v2.1 + id: short-sha + with: + length: 7 + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: "{{defaultContext}}:api" + push: true + tags: uugai/facialaccess-backend:${{ steps.short-sha.outputs.sha }}