Skip to content

Commit

Permalink
chore(build): add
Browse files Browse the repository at this point in the history
  • Loading branch information
alextes committed May 7, 2024
1 parent cc7b18c commit 38aab70
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and Push Docker Image

on:
push:
branches:
- main

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
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: alextes
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract short SHA
run: echo "SHORT_SHA=$(echo ${{ github.sha }} | cut -c 1-7)" >> $GITHUB_ENV

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
ultrasoundorg/misc-nginx:${{ env.SHORT_SHA }}
ultrasoundorg/misc-nginx:latest
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 38aab70

Please sign in to comment.