Skip to content

Commit

Permalink
docker build workflow attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
DevopsGoth committed Aug 20, 2024
1 parent 01a9725 commit 06f1bcc
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/graphql_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Docker build - graphql

on:
push:
paths:
- 'packages/apps/graph/**'

jobs:
docker-build:
runs-on: ubuntu-latest
steps:
- Checkout repository
uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/kadena-community/kadena-graphql
tags: |
type=sha
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
push: true
context: packages/apps/graph
file: ./Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

0 comments on commit 06f1bcc

Please sign in to comment.