flowermd #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build_icomse | |
on: | |
push: | |
branches: ['main'] | |
# Run when container is changed | |
paths: | |
- 'containers/icomse/dockerfile_icomse' | |
# Allows workflow to be manually triggered | |
workflow_dispatch: | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: icomse | |
jobs: | |
build-and-push-image: | |
if: github.repository_owner == 'cmelab' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Log in to the Container registry | |
uses: docker/[email protected] | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GHCR_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/[email protected] | |
with: | |
context: . | |
file: ./containers/icomse/dockerfile_icomse | |
push: true | |
tags: ${{ env.REGISTRY }}/cmelab/${{ env.IMAGE_NAME }}:latest |