Skip to content

Commit

Permalink
Create docker-build-push.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ivozilkenat authored Apr 2, 2024
1 parent e90996a commit 04d628c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build and Push to GHCR

on:
push:
branches:
- master

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Build and push Docker image
run: |
docker build . -t ghcr.io/${{ github.repository_owner }}/app:latest
docker push ghcr.io/${{ github.repository_owner }}/app:latest

0 comments on commit 04d628c

Please sign in to comment.