generated from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.42 KB
/
docker-slim.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow
if: ${{ github.event.workflow_run.conclusion == 'success' }} and github.repository_owner == 'alshedivat'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ github.workspace }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login
uses: docker/login-action@v3
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