Skip to content

Commit

Permalink
add build and push workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaLRussell committed Aug 9, 2024
1 parent ecd5317 commit 051d63f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/docker-sha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Always push sha image, only push for branch if all other jobs successful
on:
push:
branches:
- main
pull_request:
branches:
- '*'

name: Docker build and push SHA
jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Login to GHCR (GitHub Packages)
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ env.GITHUB_PAT }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build
run: ./docker/build

- name: Push
run: ./docker/push
6 changes: 6 additions & 0 deletions docker/push
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -e
HERE=$(dirname $0)
. $HERE/common

docker push "$APP_TAG_SHA"

0 comments on commit 051d63f

Please sign in to comment.