Skip to content

Push and comment PR build #1

Push and comment PR build

Push and comment PR build #1

Workflow file for this run

---
name: Push and comment PR build
on:
workflow_run:
workflows:
- "Build Images for PRs"
types:
- completed
jobs:
push:
runs-on: ubuntu-latest
if: >
github.event.workflow_run.conclusion == 'success'
steps:
- name: Load artifact
uses: actions/download-artifact@v4
with:
name: oci-image
path: /oci-image.tar
- name: Login to Docker hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Load image
run: |
docker load --input /oci-image.tar
docker image ls -a
- name: Docker push image
run: |
docker push hobbyfarm/hf-provisioner-digitalocean:${{ github.event.pull_request.head.sha }}
- name: Comment
uses: actions/github-script@v7
with:
github-token: ${{ secrets.DEMETER_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'An image has been built, my little sprouts. Find it here: hobbyfarm/hf-provisioner-digitalocean:${{ github.event.pull_request.head.sha }}'
})