Skip to content

add dependencies 5

add dependencies 5 #18

Workflow file for this run

name: Build and Push
on:
push:
branches:
- main
- dev
workflow_dispatch:
concurrency:
group: ${{ github.ref_name }}_environment
cancel-in-progress: true
jobs:
build-and-push:
runs-on: ubuntu-24.04-arm
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set lowercase repository owner
id: lowercase
run: echo "owner=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
- name: Set image name
id: image
run: |
if [ "${{ github.ref_name }}" = "dev" ]; then
echo "name=check-in-dev" >> $GITHUB_OUTPUT
echo "extra_tag=ghcr.io/${{ steps.lowercase.outputs.owner }}/check-in-dev:latest" >> $GITHUB_OUTPUT
else
echo "name=check-in" >> $GITHUB_OUTPUT
echo "extra_tag=ghcr.io/${{ steps.lowercase.outputs.owner }}/check-in:latest" >> $GITHUB_OUTPUT
fi
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
ghcr.io/${{ steps.lowercase.outputs.owner }}/${{ steps.image.outputs.name }}:${{ github.sha }}
${{ steps.image.outputs.extra_tag }}