Skip to content

Fixed image tags for workflow #4

Fixed image tags for workflow

Fixed image tags for workflow #4

Workflow file for this run

name: Build
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
push:
# branches: [ "master" ]
branches: [ "github-action" ] # for debug
pull_request:
branches: [ "master" ]
env:
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
build-image-visualization:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/visualization
tags: |
# set latest tag for default branch
#type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=test
- name: Build and push Docker image (visualization)
uses: docker/build-push-action@v5
with:
context: ./visualization
#file: ./visualization/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}