actions: create build-only workflow for testing automated builds and later for PR autochecks
Some checks failed
Build only (for PRs) / build-only (push) Failing after 5m7s
Some checks failed
Build only (for PRs) / build-only (push) Failing after 5m7s
This commit is contained in:
37
.gitea/workflows/build-only.yaml
Normal file
37
.gitea/workflows/build-only.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Build only (for PRs)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v1-refactor # after this has been merged
|
||||
|
||||
jobs:
|
||||
build-only:
|
||||
runs-on: ubuntu-latest # Use a runner with Docker support
|
||||
container: ghcr.io/catthehacker/ubuntu:act-latest # Image with Docker pre-installed
|
||||
outputs:
|
||||
sha_short: ${{ steps.vars.outputs.sha_short }}
|
||||
steps:
|
||||
# Checkout the repository code
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set outputs
|
||||
id: vars
|
||||
run: |
|
||||
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
# Set up Docker Buildx for building the image
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver: remote
|
||||
endpoint: 'tcp://buildkitd:1234'
|
||||
|
||||
# Build and push the Docker image
|
||||
- name: Build and Push Docker Image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: . # Build context (current directory)
|
||||
file: ./Dockerfile # Path to Dockerfile
|
||||
platforms: "linux/amd64,linux/arm64"
|
||||
Reference in New Issue
Block a user