Docker Slim #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' }} | ||
Check failure on line 18 in .github/workflows/docker-slim.yml GitHub Actions / Docker SlimInvalid workflow file
|
||
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.1.1 | ||
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 |