Skip to content

Commit

Permalink
Create publish-main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tnix100 authored Dec 5, 2024
1 parent 668087e commit 7def705
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/publish-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish main to GHCR.io

on:
push:
branches: [ "main" ]

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 GHCR.io
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Build and push images
run: |
IMAGE_NAME=ghcr.io/${{ github.repository }}
docker buildx build --push -t $IMAGE_NAME:${{ github.sha }} -t $IMAGE_NAME:latest .

0 comments on commit 7def705

Please sign in to comment.