Skip to content

Merge pull request #27 from serlo/feature/reduce-image-size #28

Merge pull request #27 from serlo/feature/reduce-image-size

Merge pull request #27 from serlo/feature/reduce-image-size #28

Workflow file for this run

name: Docker
on:
push:
branches:
- main
jobs:
update-version:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.version.outputs.tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- id: version
uses: salsify/action-detect-and-tag-new-version@v2
with:
tag-template: '{VERSION}'
version-command: |
cat VERSION
push:
runs-on: ubuntu-latest
needs: update-version
if: ${{ needs.update-version.outputs.tag }}
steps:
- uses: actions/checkout@v4
- uses: google-github-actions/auth@v1
with:
credentials_json: '${{ secrets.GCP_KEY_CONTAINER_REGISTRY }}'
- uses: google-github-actions/setup-gcloud@v1
- run: gcloud auth configure-docker
- uses: docker/build-push-action@v5
with:
push: true
file: ./Dockerfile
tags: eu.gcr.io/serlo-shared/serlo-mysql-database:latest,eu.gcr.io/serlo-shared/serlo-mysql-database:${{ needs.update-version.outputs.tag }}
- name: Test for mysql in the serlo-mysql-database image
run:
docker run --entrypoint='' --rm eu.gcr.io/serlo-shared/serlo-mysql-database:latest mysql --version