Skip to content

๐Ÿ—๏ธ GitHub Action for building and publishing Docker images to GitHub.

License

Notifications You must be signed in to change notification settings

saturdayshdev/build-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Build Action

GitHub Action for building and publishing Docker images to GitHub Packages.

Usage

To use this action, simply create a workflow in .github/workflows and use it:

name: Build

on:
  push:
    branches: [main, develop]

env:
  IMAGE_NAME: ${{ github.event.repository.name }}
  IMAGE_TAG: ${{ github.ref == 'refs/heads/main' && 'production' || 'staging' }}
  IMAGE_PATH: docker/${{ github.ref == 'refs/heads/main' && 'production' || 'staging' }}

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - name: Build
        uses: saturdayshdev/[email protected]
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          dockerfile: ${{ env.IMAGE_PATH }}/Dockerfile
          image: ${{ env.IMAGE_BASE }}
          tag: ${{ env.IMAGE_TAG }}

About

๐Ÿ—๏ธ GitHub Action for building and publishing Docker images to GitHub.

Resources

License

Stars

Watchers

Forks