Skip to content

ci: push image

ci: push image #4

name: CI
on: [push]
jobs:
build-and-push-image:
runs-on: ubuntu-latest
env:
IMAGE_NAME: "oc4ids-datastore-pipeline"
steps:
- uses: actions/checkout@v4
- name: Build image
run: docker build -t oc4ids-datastore-pipeline .
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Print image ID
run: |
echo $GITHUB_HEAD_REF
echo $GITHUB_REF
IMAGE_TAG=latest
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:$IMAGE_TAG
echo $IMAGE_ID