Skip to content

Update Workflow

Update Workflow #315

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Daily at midnight UTC
push:
paths:
- '**/dfo.yaml'
- '.github/workflows/*.yml'
name: Update Workflow
jobs:
update-workflow:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@master
with:
token: ${{ secrets.CONTEMPT_TOKEN }}
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: 'stable'
cache: false
- name: Install latest dfo
uses: mattdowdell/go-installer@v0.3.0
with:
package: github.com/greboid/dfo
- name: Do stuff
run: |
git clone https://github.com/greboid/dfo.git
go install -C ./dfo .
- name: Update workflow
env:
REGISTRY: ${{ secrets.REGISTRY }}
run: |
dfo orchestrate --workflow --directory .
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "Update container workflow"
commit_user_name: ${{ secrets.GIT_USERNAME }}
commit_user_email: ${{ secrets.GIT_EMAIL }}
file_pattern: '.github/workflows/update-containers.yml'
- name: Push changes
uses: cutlerydrawer/action-git-try-push@v2