Skip to content

πŸ§‘πŸΌβ€πŸ”§ ci: Apply sha7 for develop branch #5

πŸ§‘πŸΌβ€πŸ”§ ci: Apply sha7 for develop branch

πŸ§‘πŸΌβ€πŸ”§ ci: Apply sha7 for develop branch #5

Workflow file for this run

name: ci-dev
on:
push:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- 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: Extract short SHA
id: sha7
run: echo "::set-output name=short::$(echo ${{ github.sha }} | cut -c1-7)"
- name: Publish as GitHub Package
uses: docker/build-push-action@v5
with:
provenance: false
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: | # latest and commit hash-7 characters
ghcr.io/${{ github.repository }}-dev:latest
ghcr.io/${{ github.repository }}-dev:${{ steps.sha7.outputs.short }}