Skip to content

chore(deps): update actions/checkout action to v4.2.0 #4

chore(deps): update actions/checkout action to v4.2.0

chore(deps): update actions/checkout action to v4.2.0 #4

Workflow file for this run

---
name: Build and test container image
on:
pull_request:
branches: [main]
workflow_dispatch:
env:
REPO_NAME: mattkobayashi
IMAGE_NAME: fuelhook
jobs:
create-runner:
name: Create self-hosted Actions runner
secrets: inherit
strategy:
fail-fast: false
matrix:
runner-name: [
fuelhook
]
uses: ./.github/workflows/create-runner.yaml
build-test:
name: Build and test container image
runs-on: self-hosted
needs: [create-runner]
permissions:
contents: read
steps:
# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/[email protected]
# Set up Docker Buildx
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/[email protected]
with:
buildkitd-config-inline: |
[registry."docker.io"]
mirrors = ["registry-mirror:5000"]
[registry."registry-mirror:5000"]
http = true
driver-opts: |
network=mattflix
# Checkout repository
# https://github.com/actions/checkout
- name: Checkout repository
uses: actions/[email protected]
# Build and export image to Docker daemon
# https://github.com/docker/build-push-action
- name: Build and export to Docker
uses: docker/[email protected]
with:
load: true
tags: "${{ env.REPO_NAME }}/${{ env.IMAGE_NAME }}:test"
# Test the built image
- name: Test image
run: |
set -ex
timeout --kill-after=30s --preserve-status 30s docker container run --rm ${{ env.REPO_NAME }}/${{ env.IMAGE_NAME }}:test