Skip to content

chore(deps): update actions/checkout action to v4.2.2 #142

chore(deps): update actions/checkout action to v4.2.2

chore(deps): update actions/checkout action to v4.2.2 #142

Workflow file for this run

name: Publish OCI image
on:
push:
jobs:
push_to_registry:
name: Push image to GitHub registry
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4.2.2
- name: Check if we need to login and if image should be pushed
id: push_check
run: |
if [[ "${{ github.ref }}" == refs/heads/main ]]; then
echo "push=true" >> $GITHUB_OUTPUT
else
echo "push=false" >> $GITHUB_OUTPUT
fi
- name: Log in to the Container registry
if: ${{ steps.push_check.outputs.push }}
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6.9.0
with:
context: .
push: ${{ steps.push_check.outputs.push }}
tags: "ghcr.io/${{ github.repository }}:latest"