Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesabarnes authored May 27, 2024
1 parent 3d83e0c commit f97d860
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@ on:
branches: [ "main" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

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

- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin

- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
run: docker build . --file Dockerfile --tag ghcr.io/${{ github.repository_owner }}/my-image-name:latest

- name: Push the Docker image
run: docker push ghcr.io/${{ github.repository_owner }}/my-image-name:latest

0 comments on commit f97d860

Please sign in to comment.