Skip to content

Commit

Permalink
Fixed cron trigger, and a few cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ooshlablu committed Jan 29, 2023
1 parent f85fa5a commit bd9fbd1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:

# Pull in the AppImage build workflow
AppImage_Package:
name: Build the AppImage package
name: Build the AppImage
uses: ./.github/workflows/appimage.yml
with:
package_complete_version: ${{ needs.determine_version.outputs.complete_version }}
Expand Down
22 changes: 8 additions & 14 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ env:

jobs:
# Decide if we need to build the containers on this run
determine_docker_version:
determine_docker_build:
name: Determine whether to build the containers or not
runs-on: ubuntu-latest
outputs:
build_docker_containers: ${{ steps.version.outputs.build_docker_containers }}
build_docker_containers: ${{ steps.docker_check.outputs.build_docker_containers }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Determine version
id: version
- name: Build docker check
id: docker_check
run: |
# Only run the container builds when something in the docker folder or
# this workflow has changed from master, or if it was cron triggered
Expand All @@ -47,7 +47,7 @@ jobs:
name: Build the Linux packages
runs-on: ubuntu-latest
needs:
- determine_docker_version
- determine_docker_build
strategy:
matrix:
include:
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build ${{ matrix.os }} ${{ matrix.version }} Container
if: ${{ needs.determine_docker_version.outputs.build_docker_containers == 'true' }}
if: ${{ needs.determine_docker_build.outputs.build_docker_containers == 'true' }}
uses: docker/build-push-action@v3
with:
context: docker/
Expand All @@ -95,11 +95,6 @@ jobs:
build-args: OS_VERSION=${{ matrix.version }}

- name: Build package
# Don't build the packages if triggered by cron because it will not
# have the correct inputs required to construct the package names correctly.
# The cron schedule is really for making sure the docker containers are
# up-to-date anyway.
if: ${{ github.event_name != 'schedule' }}
run: |
# Pull in our common build functions
. .github/workflows/build_functions.sh
Expand All @@ -116,7 +111,7 @@ jobs:
#fi
# Only pull the container if it wasn't built locally
if [ '${{ needs.determine_docker_version.outputs.build_docker_containers }}' = 'false' ]; then
if [ '${{ needs.determine_docker_build.outputs.build_docker_containers }}' = 'false' ]; then
docker pull ${{ env.CONTAINER_NAME }}
fi
Expand All @@ -128,7 +123,6 @@ jobs:
package_name "$(pwd)/build" "Composer*64.*" "${PACKAGE_VERSION}" "${{ matrix.os }}" "${{ matrix.version }}"
#- name: Run unit tests
# if: ${{ github.event_name != 'schedule' }}
# run: |
# # Run the containers with the script for each testing suite
# docker run --rm -v $(pwd):/github_actions_build/ ${{ env.CONTAINER_NAME }} ./run_tests.sh
Expand Down Expand Up @@ -166,7 +160,7 @@ jobs:
uses: docker/build-push-action@v3
# Containers can't be pushed during PRs because of the way permissions
# are delegated to secrets.GITHUB_TOKEN
if: ${{ needs.determine_docker_version.outputs.build_docker_containers == 'true' && github.event_name != 'pull_request' }}
if: ${{ needs.determine_docker_build.outputs.build_docker_containers == 'true' && github.event_name != 'pull_request' }}
with:
context: docker/
file: ./docker/Dockerfile.${{ matrix.os }}
Expand Down

0 comments on commit bd9fbd1

Please sign in to comment.