update at schema #63
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: Backend Continuous Integration | |
on: | |
pull_request: | |
paths: | |
- '.github/workflows/backend-ci.yml' | |
- 'api/**' | |
- '!api/.gitignore' | |
- '!api/README.md' | |
- '.gitmodules' | |
push: | |
paths: | |
- '.github/workflows/backend-ci.yml' | |
- 'api/**' | |
- '!api/.gitignore' | |
- '!api/README.md' | |
- '.gitmodules' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
submodules: true | |
- name: Docker login | |
env: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
run: docker login https://docker.pkg.github.com -u ${username} -p ${password} | |
- name: Build Third Party Image | |
env: | |
DOCKER_BUILDKIT: 1 | |
run: | | |
cd ./api | |
if git diff --exit-code ../.gitmodules || git diff --exit-code ./third-party || git diff --exit-code ./Dockerfile | |
then | |
docker build . -t docker.pkg.github.com/memelabs/rustla2/rustla2-api:thirdPartyBase --build-arg APP_ENV=full --target full-build | |
else | |
return 0 | |
fi | |
- name: Build API Image | |
env: | |
DOCKER_BUILDKIT: 1 | |
run: cd ./api && docker build . -t docker.pkg.github.com/memelabs/rustla2/rustla2-api:stable | |
- name: Download container structure test binary | |
uses: fnkr/github-action-git-bash@v1 | |
with: | |
args: "wget -O ./api/container-structure-test https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-amd64" | |
- name: Chmod | |
uses: fnkr/github-action-git-bash@v1 | |
with: | |
args: "chmod +x ./api/container-structure-test" | |
- name: Test image | |
uses: fnkr/github-action-git-bash@v1 | |
with: | |
args: "./api/container-structure-test test --image docker.pkg.github.com/memelabs/rustla2/rustla2-api:stable --config ./api/container_test.yaml" |