Skip to content

update docker to best practices, update readme, and update trunk yaml #4

update docker to best practices, update readme, and update trunk yaml

update docker to best practices, update readme, and update trunk yaml #4

Workflow file for this run

name: Build and Deploy Docker Image
permissions:
contents: read
packages: write
on:
push:
branches:
- main
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract short SHA
id: sha
run: echo "::set-output name=short_sha::$(echo ${GITHUB_SHA} | cut -c 1-7)"
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: mlpierce22/tea:${{ steps.sha.outputs.short_sha }}
- name: Output Docker image name
run: |
echo "Docker image name: mlpierce22/tea:${{ steps.sha.outputs.short_sha }}"