mirror of
https://github.com/morbalint/kemkas.git
synced 2026-07-17 19:03:46 +00:00
use docker layer cache
This commit is contained in:
@@ -44,22 +44,20 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: docker build
|
- uses: docker/setup-buildx-action@v3
|
||||||
run: |
|
|
||||||
cd ./frontend
|
|
||||||
docker build . -t kemkas:${GITHUB_SHA::8}
|
|
||||||
- name: Install doctl
|
- name: Install doctl
|
||||||
uses: digitalocean/action-doctl@v2
|
uses: digitalocean/action-doctl@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.DO_ACCESS_TOKEN }}
|
token: ${{ secrets.DO_ACCESS_TOKEN }}
|
||||||
- name: Log in to DigitalOcean Container Registry with short-lived credentials
|
- name: Log in to DigitalOcean Container Registry with short-lived credentials
|
||||||
run: doctl registry login --expiry-seconds 1200
|
run: doctl registry login --expiry-seconds 1200
|
||||||
- name: Tag container image
|
- uses: docker/build-push-action@v5
|
||||||
run: |
|
with:
|
||||||
docker tag kemkas:${GITHUB_SHA::8} registry.digitalocean.com/kemkas/kemkas:${GITHUB_SHA::8}
|
context: frontend/
|
||||||
- name: Push image to Container Registry
|
cache-from: type=gha
|
||||||
run: |
|
cache-to: type=gha,mode=max
|
||||||
docker push registry.digitalocean.com/kemkas/kemkas:${GITHUB_SHA::8}
|
push: true
|
||||||
|
tags: registry.digitalocean.com/kemkas/kemkas:${GITHUB_SHA::8}
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user