Skip to content

Publish Files

Publish Files #7882

Workflow file for this run

name: Publish Files
on:
push:
branches:
- main
workflow_dispatch:
jobs:
changed_files:
runs-on: ubuntu-latest
name: Test changed-files
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v39
with:
separator: ","
files: |
modules/**/*.json
providers/**/*.json
- name: Install Go
uses: actions/setup-go@v4
if: steps.changed-files.outputs.any_changed == 'true'
- name: Created files
run: go run ./cmd/main.go publish ${{ steps.changed-files.outputs.all_changed_files }}
if: steps.changed-files.outputs.any_changed == 'true'
- name: Publish Changes
uses: s0/git-publish-subdir-action@develop
if: steps.changed-files.outputs.any_changed == 'true'
env:
REPO: self
BRANCH: host
FOLDER: dist
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CLEAR_GLOBS_FILE: ".clear-target-files" # Points to an empty file, to not clear any file from the host branch