Merge pull request #3008 from dvoraen/workflow_fix
Workflow string fixes for GitHub
This commit is contained in:
commit
76c86130f6
2 changed files with 12 additions and 12 deletions
14
.github/actions/setup-database.yml
vendored
14
.github/actions/setup-database.yml
vendored
|
|
@ -21,7 +21,7 @@ runs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up PostgreSQL server
|
- name: Set up PostgreSQL server
|
||||||
if: ${{ inputs.database == "postgresql" }}
|
if: ${{ inputs.database == 'postgresql' }}
|
||||||
uses: harmon758/postgresql-action@v1
|
uses: harmon758/postgresql-action@v1
|
||||||
with:
|
with:
|
||||||
postgresql version: "11"
|
postgresql version: "11"
|
||||||
|
|
@ -30,7 +30,7 @@ runs:
|
||||||
postgresql password: "password"
|
postgresql password: "password"
|
||||||
|
|
||||||
- name: Wait for PostgreSQL to activate
|
- name: Wait for PostgreSQL to activate
|
||||||
if: ${{ inputs.database == "postgresql" }}
|
if: ${{ inputs.database == 'postgresql' }}
|
||||||
run: |
|
run: |
|
||||||
while ! pg_isready -h 127.0.0.1 -q >/dev/null 2>&1
|
while ! pg_isready -h 127.0.0.1 -q >/dev/null 2>&1
|
||||||
do
|
do
|
||||||
|
|
@ -41,7 +41,7 @@ runs:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Set up MySQL server
|
- name: Set up MySQL server
|
||||||
if: ${{ inputs.database == "mysql" }}
|
if: ${{ inputs.database == 'mysql' }}
|
||||||
uses: mirromutth/mysql-action@v1.1
|
uses: mirromutth/mysql-action@v1.1
|
||||||
with:
|
with:
|
||||||
host port: 3306
|
host port: 3306
|
||||||
|
|
@ -55,7 +55,7 @@ runs:
|
||||||
mysql root password: root_password
|
mysql root password: root_password
|
||||||
|
|
||||||
- name: Wait for MySQL to activate
|
- name: Wait for MySQL to activate
|
||||||
if: ${{ inputs.database == "mysql" }}
|
if: ${{ inputs.database == 'mysql' }}
|
||||||
run: |
|
run: |
|
||||||
while ! mysqladmin ping -h 127.0.0.1 -u root -proot_password -s >/dev/null 2>&1
|
while ! mysqladmin ping -h 127.0.0.1 -u root -proot_password -s >/dev/null 2>&1
|
||||||
do
|
do
|
||||||
|
|
@ -66,7 +66,7 @@ runs:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Set up MySQL Privileges
|
- name: Set up MySQL Privileges
|
||||||
if: ${{ inputs.database == "mysql" }}
|
if: ${{ inputs.database == 'mysql' }}
|
||||||
run: |
|
run: |
|
||||||
cat <<EOF | mysql -u root -proot_password -h 127.0.0.1 mysql
|
cat <<EOF | mysql -u root -proot_password -h 127.0.0.1 mysql
|
||||||
create user 'evennia'@'%' identified by 'password';
|
create user 'evennia'@'%' identified by 'password';
|
||||||
|
|
@ -78,9 +78,9 @@ runs:
|
||||||
|
|
||||||
# get logs from db start
|
# get logs from db start
|
||||||
- name: Database container logs
|
- name: Database container logs
|
||||||
if: ${{ inputs.database == "postgresql" || inputs.database == "mysql" }}
|
if: ${{ inputs.database == 'postgresql' || inputs.database == 'mysql' }}
|
||||||
uses: jwalton/gh-docker-logs@v2
|
uses: jwalton/gh-docker-logs@v2
|
||||||
|
|
||||||
- name: Check running containers
|
- name: Check running containers
|
||||||
if: ${{ inputs.database == "postgresql" || inputs.database == "mysql" }}
|
if: ${{ inputs.database == 'postgresql' || inputs.database == 'mysql' }}
|
||||||
run: docker ps -a
|
run: docker ps -a
|
||||||
|
|
|
||||||
10
.github/workflows/github_action_test_suite.yml
vendored
10
.github/workflows/github_action_test_suite.yml
vendored
|
|
@ -95,7 +95,7 @@ jobs:
|
||||||
# it's also not critical if pushing to either service fails (happens for PRs since env is not
|
# it's also not critical if pushing to either service fails (happens for PRs since env is not
|
||||||
# available outside of the evennia org)
|
# available outside of the evennia org)
|
||||||
- name: Send data to Coveralls
|
- name: Send data to Coveralls
|
||||||
if: ${{ matrix.coverage-test && (github.ref == "refs/heads/master" || github.ref == "refs/heads/develop") }}
|
if: ${{ matrix.coverage-test && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop') }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
||||||
|
|
@ -107,7 +107,7 @@ jobs:
|
||||||
name: Deploy Docker Image
|
name: Deploy Docker Image
|
||||||
needs: test
|
needs: test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.repository == "evennia/evennia" }}
|
if: ${{ github.repository == 'evennia/evennia' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
|
@ -118,14 +118,14 @@ jobs:
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
if: ${{ github.ref == "refs/heads/master" || github.ref == "refs/heads/develop" }}
|
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' }}
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push for master
|
- name: Build and push for master
|
||||||
if: ${{ github.ref == "refs/heads/master" }}
|
if: ${{ github.ref == 'refs/heads/master' }}
|
||||||
id: docker_build_master
|
id: docker_build_master
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
|
|
@ -133,7 +133,7 @@ jobs:
|
||||||
tags: evennia/evennia:latest
|
tags: evennia/evennia:latest
|
||||||
|
|
||||||
- name: Build and push for develop
|
- name: Build and push for develop
|
||||||
if: ${{ github.ref == "refs/heads/develop" }}
|
if: ${{ github.ref == 'refs/heads/develop' }}
|
||||||
id: docker_build_develop
|
id: docker_build_develop
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue