Merge pull request #21 from SamuraiWTF/fix-sqlite-db-location #21
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 Image CI | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name : Build and push basicphp image | |
run: | | |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/dojo-basic | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | |
[ "$VERSION" == "master" ] && VERSION=latest | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker build . --file .shogun/Dockerfile.dojo-basic --tag dojo-basic | |
docker tag dojo-basic $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION | |
- name : Build and push basicdb image | |
run: | | |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/dojo-basic-db | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | |
[ "$VERSION" == "master" ] && VERSION=latest | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker build . --file .shogun/Dockerfile.dojo-basic-db --tag dojo-basic-db | |
docker tag dojo-basic-db $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION | |
- name : Build and push scavengerphp image | |
run: | | |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/dojo-scavenger | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | |
[ "$VERSION" == "master" ] && VERSION=latest | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker build . --file .shogun/Dockerfile.dojo-scavenger --tag dojo-scavenger | |
docker tag dojo-scavenger $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION | |
- name : Build and push scavengerdb image | |
run: | | |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/dojo-scavenger-db | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | |
[ "$VERSION" == "master" ] && VERSION=latest | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker build . --file .shogun/Dockerfile.dojo-scavenger-db --tag dojo-scavenger-db | |
docker tag dojo-scavenger-db $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION | |
- name : Build and push basicphp-lite image | |
run: | | |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/dojo-basic-lite | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | |
[ "$VERSION" == "master" ] && VERSION=latest | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker build . --file .shogun/Dockerfile.dojo-basic-lite --tag dojo-basic-lite | |
docker tag dojo-basic-lite $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION |