Skip to content

docs: improve community pages #25

docs: improve community pages

docs: improve community pages #25

name: test-and-release
on:
push:
branches:
- main
workflow_dispatch:
pull_request:
permissions: read-all
jobs:
docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: docker-build
run: "make docker-build"
test-action-with-input-file:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Alway 0 to be sure to fetch all your files
- name: Run envsubst
uses: ./
with:
working-directory: "tests"
input-file: "input.txt"
output-file: "output.txt"
env:
FOO: "world"
- name: display output
run: cat ./tests/output.txt
- name: test-file-content
run: '[[ "$(cat ./tests/output.txt)" = "Hello world" ]]'
test-action-with-input-pattern:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Alway 0 to be sure to fetch all your files
- name: Run envsubst
uses: ./
with:
working-directory: "tests"
input-file-pattern: "*.txt"
output-file-suffix: ".out"
env:
FOO: "world"
- name: display output
run: |
pwd
ls -l
ls -l tests
cat ./tests/input.txt.out
- name: test-file-content
run: '[[ "$(cat ./tests/input.txt.out)" = "Hello world" ]]'
test-entrypoint-script:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: test-entrypoint
working-directory: tests
run: "make tests"
release:
runs-on: ubuntu-latest
concurrency:
group: release-${{ github.ref }}-${{ github.event_name }}
permissions:
contents: write
issues: write
id-token: write
packages: write
needs:
- docker-build
- test-action-with-input-file
- test-action-with-input-pattern
- test-entrypoint-script
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Release this GitHub Action
uses: rlespinasse/release-that@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}