Skip to content

ignore unnecessary files in docker builds #1

ignore unnecessary files in docker builds

ignore unnecessary files in docker builds #1

Workflow file for this run

on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 1
- id: short-sha
run: |
echo "tag=$(echo "$sha" | cut -c1-7)" >> "$GITHUB_OUTPUT"
env:
sha: ${{ github.sha }}
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build and push
uses: docker/bake-action@v3
with:
files: docker-bake.hcl
push: true
load: false
set: |
server.cache-from=type=gha
server.cache-to=type=gha,mode=max
env:
TAG: ${{ steps.short-sha.outputs.tag }}
IMAGE_NAME: ghcr.io/${{ github.repository }}