Skip to content

Commit

Permalink
Create build-docker-dev.yml
Browse files Browse the repository at this point in the history
This builds a docker container with the "dev" tag for whatever exists in the main branch
  • Loading branch information
JaredHatfield authored Aug 1, 2024
1 parent 5157c3d commit f5aa7e9
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build-docker-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and Push Development Docker Image

on:
push:
branches: [ "main" ]

jobs:
build-and-push:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v4

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

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set lowercase repository name
run: |
echo "REPO_LC=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ghcr.io/${{ env.REPO_LC }}:dev

0 comments on commit f5aa7e9

Please sign in to comment.