Skip to content

Commit

Permalink
Merge pull request #387 from ConductionNL/fix/workflow
Browse files Browse the repository at this point in the history
workflow fix
  • Loading branch information
bbrands02 authored Nov 4, 2024
2 parents 8ca349d + 9596551 commit b3101fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- name: Install Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Export release code
if: (success() || failure())
id: releasecode #version number in a more comprehensible format: 0.1.YearMonthDay in UTC
Expand Down Expand Up @@ -57,15 +52,15 @@ jobs:
- name: Print definitive APP_ENV
run: echo "APP_ENV is now $APP_ENV and APP_BUILD is now $APP_BUILD"
- name: Build the Docker image
run: docker-compose build --build-arg APP_ENV=$APP_ENV --build-arg APP_BUILD=$APP_BUILD --build-arg APP_BUILD_ALL_FIXTURES=true
run: docker compose build --build-arg APP_ENV=$APP_ENV --build-arg APP_BUILD=$APP_BUILD --build-arg APP_BUILD_ALL_FIXTURES=true
- name: Run the docker image
run: docker-compose up -d
run: docker compose up -d
- name: Taking some sleep (for containers to come up)
run: sleep 20
- name: Check if all containers are running
run: docker ps
- name: Dumping the logs
run: docker-compose logs
run: docker compose logs
- name: Show all images
run: docker images
- name: Login to Container Registry
Expand All @@ -79,13 +74,13 @@ jobs:
fi
- if: steps.containerregistry-login.outputs.success == 'true' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/development')
name: Push to Container Registry
run: docker-compose push
run: docker compose push

- if: steps.containerregistry-login.outputs.success == 'true' && github.ref == 'refs/heads/main'
name: Push versioned containers to Container Registry
id: version-push
run: |
images=$(docker-compose images -q | xargs docker inspect --format='{{ index .RepoTags 0}}' | cut -d':' -f1 | grep $APP_NAME)
images=$(docker compose images -q | xargs docker inspect --format='{{ index .RepoTags 0}}' | cut -d':' -f1 | grep $APP_NAME)
for image in $images
do
docker push "${image}":"${APP_BUILD}"
Expand All @@ -109,4 +104,4 @@ jobs:
prerelease: false
- name: Chores
if: (success() || failure())
run: docker-compose down
run: docker compose down
2 changes: 1 addition & 1 deletion pwa/src/apiService/resources/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class Template {
}

public getAll = async (): Promise<any> => {
const { data } = await this._send(this._instance, "GET", `/admin/templates?limit=200`);
const { data } = await this._send(this._instance, "GET", `/admin/templates?limit=${DEFAULT_LIMIT}`);

return data;
};
Expand Down

0 comments on commit b3101fd

Please sign in to comment.