Skip to content

Commit

Permalink
Add DockerSlim (alshedivat#1699)
Browse files Browse the repository at this point in the history
  • Loading branch information
pourmand1376 authored and adityarauniyar committed Jan 17, 2024
1 parent 1ebb992 commit 5ed85b3
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/docker-slim.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Docker Slim

#Only trigger, when the build workflow succeeded
on:
workflow_run:
workflows: ["Docker Image CI"]
types:
- completed

# on:
# push:
# branches:
# - 'master'

jobs:
build:
runs-on: ubuntu-latest
if: github.repository_owner == 'alshedivat'

defaults:
run:
working-directory: ${{ github.workspace }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: update docker-compose
shell: bash
run: |
sed -i "s|\.:|${{ github.workspace }}:|g" ${{ github.workspace }}/docker-compose.yml
cat ${{ github.workspace }}/docker-compose.yml
- uses: kitabisa/docker-slim-action@v1.0.3
env:
DSLIM_PULL: true
DSLIM_COMPOSE_FILE: ${{ github.workspace }}/docker-compose.yml
DSLIM_TARGET_COMPOSE_SVC: jekyll
DSLIM_CONTINUE_AFTER: signal
with:
target: amirpourmand/al-folio
tag: "slim"

# Push to the registry
- run: docker image push amirpourmand/al-folio:slim

0 comments on commit 5ed85b3

Please sign in to comment.