Skip to content

switch to author.id, member.id isn't a guarantee #6

switch to author.id, member.id isn't a guarantee

switch to author.id, member.id isn't a guarantee #6

name: Deploy Development Docker Images to GHCR
on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
- '!main' # excludes main
workflow_dispatch:
jobs:
push-image:
runs-on: ubuntu-latest
steps:
- name: 'Make repo lowercase'
run: |
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: 'Checkout GitHub Action'
uses: actions/checkout@v4
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GH_TOKEN}}
- name: 'Build & Publish Docker Image'
run: |
docker build . --tag "ghcr.io/${REPO}:dev-${{ steps.extract_branch.outputs.branch }}"
docker push "ghcr.io/${REPO}:dev-${{ steps.extract_branch.outputs.branch }}"