Skip to content

Update Docker cache settings in GitHub Actions dev-build workflow #11

Update Docker cache settings in GitHub Actions dev-build workflow

Update Docker cache settings in GitHub Actions dev-build workflow #11

Workflow file for this run

name: Build and Push Dev Branch
on:
push:
branches:
- dev
paths:
- 'src/**'
- 'Dockerfile'
- 'assets/**'
- '.github/workflows/dev-build.yaml'
concurrency:
group: "slackwatch"
cancel-in-progress: true
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./
file: ./Dockerfile
push: true
tags: ghcr.io/slackspace-io/slackwatch:dev,ghcr.io/slackspace-io/slackwatch:${{ github.sha }}
cache-from: type=registry,ref=ghcr.io/slackspace-io/slackwatch:build-cache
cache-to: type=registry,ref=ghcr.io/slackspace-io/slackwatch:build-cache,mode=max