Skip to content

add docker-image workflow #7

add docker-image workflow

add docker-image workflow #7

Workflow file for this run

name: Docker Image CI
on:
push:
branches: ["develop", "docker-ci"]
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