@@ -21,15 +21,20 @@ jobs: | |||||
run: | | run: | | ||||
docker system prune -af | docker system prune -af | ||||
docker system prune --volumes -f | docker system prune --volumes -f | ||||
docker container stop $(docker container ls -aq) | |||||
docker container rm $(docker container ls -aq) | |||||
docker image prune -af | docker image prune -af | ||||
docker container stop $(docker container ls -aq) || true | |||||
docker container rm $(docker container ls -aq) || true | |||||
- name: Build project | - name: Build project | ||||
id: builder | id: builder | ||||
working-directory: ${{ env.working-directory }} | working-directory: ${{ env.working-directory }} | ||||
run: | | run: | | ||||
bash build-docker.sh | bash build-docker.sh | ||||
echo ::set-output name=filename::$(ls deploy/*.tar.xz | xargs -n 1 basename) | echo ::set-output name=filename::$(ls deploy/*.tar.xz | xargs -n 1 basename) | ||||
- name: Fix Permissions | |||||
id: fix_perm_filename | |||||
run: | | |||||
chmod a+rw ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }} | |||||
echo ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }} | |||||
- name: Create Release | - name: Create Release | ||||
id: create_release | id: create_release | ||||
uses: actions/create-release@v1 | uses: actions/create-release@v1 | ||||
@@ -18,15 +18,20 @@ jobs: | |||||
run: | | run: | | ||||
docker system prune -af | docker system prune -af | ||||
docker system prune --volumes -f | docker system prune --volumes -f | ||||
docker container stop $(docker container ls -aq) | |||||
docker container rm $(docker container ls -aq) | |||||
docker image prune -af | docker image prune -af | ||||
docker container stop $(docker container ls -aq) || true | |||||
docker container rm $(docker container ls -aq) || true | |||||
- name: Build project | - name: Build project | ||||
id: builder | id: builder | ||||
working-directory: ${{ env.working-directory }} | working-directory: ${{ env.working-directory }} | ||||
run: | | run: | | ||||
bash build-docker.sh | bash build-docker.sh | ||||
echo ::set-output name=filename::$(ls deploy/*.tar.xz | xargs -n 1 basename) | echo ::set-output name=filename::$(ls deploy/*.tar.xz | xargs -n 1 basename) | ||||
- name: Fix Permissions | |||||
id: fix_perm_filename | |||||
run: | | |||||
chmod a+rw ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }} | |||||
echo ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }} | |||||
- uses: actions/upload-artifact@v1 | - uses: actions/upload-artifact@v1 | ||||
with: | with: | ||||
name: ${{ steps.builder.outputs.filename }} | name: ${{ steps.builder.outputs.filename }} | ||||