Skip to content

Commit

Permalink
revert: revert ci pr changes
Browse files Browse the repository at this point in the history
  • Loading branch information
TechClusterHQ authored Oct 20, 2024
1 parent 173d580 commit c808231
Showing 1 changed file with 5 additions and 26 deletions.
31 changes: 5 additions & 26 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,17 @@ name: Docker
# documentation.

on:
schedule:
- cron: '17 15 * * *'
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
pull_request_target:
types: [opened]
workflow_dispatch:

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
PR_NUMBER: ${{ github.event.number }}


jobs:
build:
Expand All @@ -31,7 +28,6 @@ jobs:
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
pull-requests: write

steps:
- name: Checkout repository
Expand Down Expand Up @@ -77,7 +73,7 @@ jobs:
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ github.event_name == 'pull_request' && 'potentially-unsafe-pr-${{ PR_NUMBER }}' || steps.meta.outputs.tags }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
Expand All @@ -95,21 +91,4 @@ jobs:
DIGEST: ${{ steps.build-and-push.outputs.digest }}
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}

comment:
if: github.event_name == 'pull_request_target'
runs-on: ubuntu-latest
steps:
- name: Comment on PR
uses: actions/github-script@v7
with:
script: |
const prNumber = context.payload.pull_request.number;
const tag = 'potentially-unsafe-pr-${{ PR_NUMBER }}';
github.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: `Docker image: ${tag}`
});
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}

0 comments on commit c808231

Please sign in to comment.