Skip to content

Commit

Permalink
attempt 1 docker build and push
Browse files Browse the repository at this point in the history
  • Loading branch information
farflungfish committed Nov 30, 2023
1 parent 7e2f0e1 commit 96fba7a
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,31 @@ on:
pull_request:
branches: [ "main" ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: hlds

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

permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker buildx build . --tag latest --cache-to type=gha --cache-from=gha
- name: Checkout repository
uses: actions/checkout@v4

- name: Login to container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
push: true
tags: latest

0 comments on commit 96fba7a

Please sign in to comment.