GitHub Action implementation for building a docker image.
Use with GitHub Actions
Example: .github/workflows/CI.yml
name: "CI"
on:
push:
branches:
- devel
pull_request:
jobs:
build_images:
name: "Build Images"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Image
uses: MasterOfMalt/Atom.DevOps.GitHubActions/Docker_Build_Image@v1
with:
image_name: "dash"
dockerfile: "Dockerfile"
registry: ghcr.io/your_repository_in_lower_case/Mandatory argument:
image_name: "<your image name>"Optional input values (and defaults):
dockerfile: "Dockerfile"
tag_name: "tag to use for the docker image"
registry: "ghcr.io/your_repository_in_lower_case/"
cache_setting: "Docker Cache setting for use in docker build."You can find a working and not working PR here
The following external actions are referenced in this action: