Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker-publish.yml #707

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 36 additions & 13 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
tags:
- v*

jobs:
jobs:
mysql57:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'WIP')
Expand Down Expand Up @@ -38,36 +38,59 @@ jobs:
characterSet: utf8mb4
collation: utf8mb4_general_ci
sqlMode: NO_ENGINE_SUBSTITUTION

- name: Print running docker containers
run: docker ps

- name: Check out the repo
uses: actions/checkout@v3

- name: Get branch name
run: echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV

- name: Identify git repo path
run: ls $GITHUB_WORKSPACE && ls -l /home/runner/work/
- name: Wait for mysql

- name: Wait for MySQL
run: sleep 15

- name: Debug environment variables
run: |
echo "Admin Login: $MYSQL_ADMIN_LOGIN"
echo "Admin Password: $MYSQL_ADMIN_PASSWORD"
echo "DB Host: $BLUECHERRY_DB_HOST"

- name: Install Bluecherry Package
run: |
{
echo bluecherry bluecherry/mysql_admin_login string $MYSQL_ADMIN_LOGIN;
echo bluecherry bluecherry/mysql_admin_password password $MYSQL_ADMIN_PASSWORD;
echo bluecherry bluecherry/db_host string $BLUECHERRY_DB_HOST;
echo bluecherry bluecherry/db_userhost string $BLUECHERRY_DB_ACCESS_HOST;
echo bluecherry bluecherry/db_name string $BLUECHERRY_DB_NAME;
echo bluecherry bluecherry/db_user string $BLUECHERRY_DB_USER;
echo bluecherry bluecherry/db_password password $BLUECHERRY_DB_PASSWORD;
} | debconf-set-selections && apt install -y --no-install-recommends ./bluecherry-apps/releases/bluecherry_*.deb

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v4
with:
images: bluecherrydvr/bluecherry

- name: Build and push Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v4
with:
#working-directory: server/
context: "{{defaultContext}}:actions"
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Loading