chore(deps): bump actions/checkout from 3 to 4 #45
Workflow file for this run
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
# Action to build, test and publish the Docker image | |
# Uploading to Docker Hub only happens on changes to master | |
name: default | |
on: | |
# Enable option to manually run the action: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
# fix me | |
jobs: | |
main: | |
name: Build and test image | |
runs-on: ubuntu-latest | |
# Only run for the main repository - not forks | |
if: github.repository == 'dlang-tour/core' | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Checkout the master branch of all submodules | |
run: git submodule foreach 'git fetch && git checkout origin/master' | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Run unit tests | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: false | |
load: false | |
target: unit-test-runner | |
tags: dlangtour/core:ci_test | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Run integration tests | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: false | |
load: false | |
target: integration-test-runner | |
tags: dlangtour/core:ci_test | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Login to DockerHub | |
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Build dlang-tour runner image and push it | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} | |
load: false | |
target: runner | |
tags: dlangtour/core:latest | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |