jakehurwitzisabitch/.github/workflows/build-app-image.yml
Cory Sanin 7be4a59b68
Some checks failed
App Image CI / Build app image (push) Failing after -2m18s
add PAT to secrets
2025-04-25 23:16:11 -05:00

56 lines
1.5 KiB
YAML

name: App Image CI
on:
push:
branches:
- master
jobs:
build_app_image:
name: Build app image
runs-on: ubuntu-latest
env:
GH_REGISTRY: git.sanin.dev
IMAGE_NAME: ${{ github.repository }}
REPOSITORY: ${{ github.event.repository.name }}
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v4
- name: Set up Docker Buildx
id: buildx
uses: https://github.com/docker/setup-buildx-action@v3
with:
install: true
- name: Login to GitHub Container Registry
uses: https://github.com/docker/login-action@v3
with:
registry: ${{ env.GH_REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.PAT_TOKEN }}
- name: Extract metadata for Docker image
id: meta
uses: https://github.com/docker/metadata-action@v5
with:
images: |
${{ env.GH_REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
- name: Build and push develop Docker image
uses: https://github.com/docker/build-push-action@v6
with:
target: deploy
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
cache-from: type=gha,scope=${{ github.workflow }}
cache-to: type=gha,mode=max,scope=${{ github.workflow }}