Skip to content

Commit

Permalink
add docker-image workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
marnym authored Apr 22, 2024
1 parent 85e81a4 commit f1c3733
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Docker Image CI

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3

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

- name: Build the Docker image
run: docker build . --file Dockerfile --tag ${{ env.registry }}/${{ env.IMAGE_NAME }}:test

- name: Push the Docker image
run: docker push ${{ env.registry }}/${{ env.IMAGE_NAME }}:test

0 comments on commit f1c3733

Please sign in to comment.