Skip to content

Commit

Permalink
ci fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AAGaming00 committed Dec 30, 2023
1 parent 66f8026 commit f60926a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ on:
image:
description: "Resulting docker image (tagged with commit SHA)"
value: ${{ jobs.set_image_name.outputs.image }}

workflow_dispatch:
inputs:
tag:
type: string
description: Image tag
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
Expand All @@ -20,8 +24,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
Expand Down Expand Up @@ -56,8 +58,8 @@ jobs:
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
push: github.event_name != 'pull_request'
tags: ${{ steps.meta.outputs.tags || github.event.inputs.tag }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Checks

on:
pull_request_target:
branches:
- "main"
pull_request:
push:

defaults:
run:
Expand All @@ -29,8 +28,6 @@ jobs:
steps:
- name: "Checkout"
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- run: "make lint/${{ matrix.linter }}"

test:
Expand Down

0 comments on commit f60926a

Please sign in to comment.