Skip to content

Commit

Permalink
Revert "Updated the test" (#412)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Mar 9, 2023
1 parent 675e517 commit df4e152
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 33 deletions.
29 changes: 5 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@ on:
pull_request:
branches:
- main
push:
tags: "**"

jobs:
snapshot:
name: snapshot
runs-on: ubuntu-latest
if: !startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -129,60 +126,44 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- name: Get branch name
id: branch-name
if: startsWith(github.ref, 'refs/tags/')
uses: tj-actions/branch-names@v6
with:
strip_tag_prefix: v

- name: Test action
if: startsWith(github.ref, 'refs/tags/')
uses: ./
with:
version: ${{ steps.branch-name.outputs.tag }}

- name: Run build
if: !startsWith(github.ref, 'refs/tags/')
run: make build

- name: Test action with bin_path
if: !startsWith(github.ref, 'refs/tags/')
uses: ./
with:
bin_path: ./bin/auto_doc

- name: Run auto-doc using the test directory
if: !startsWith(github.ref, 'refs/tags/')
run: make test

- name: Run auto-doc using the top level directory
run: make run
if: !startsWith(github.ref, 'refs/tags/') && github.event.pull_request.head.repo.owner.login == github.repository_owner
if: github.event.pull_request.head.repo.owner.login == github.repository_owner

- name: Format markdown
uses: tj-actions/remark@v3
if: !startsWith(github.ref, 'refs/tags/') && github.event.pull_request.head.repo.owner.login == github.repository_owner
if: github.event.pull_request.head.repo.owner.login == github.repository_owner

- name: Verify Changed files
uses: tj-actions/verify-changed-files@v13
if: !startsWith(github.ref, 'refs/tags/') && github.event.pull_request.head.repo.owner.login == github.repository_owner
if: github.event.pull_request.head.repo.owner.login == github.repository_owner
id: verify-changed-files
with:
files: |
README.md
test/**
- name: Commit README changes
if: !startsWith(github.ref, 'refs/tags/') && github.event.pull_request.head.repo.owner.login == github.repository_owner && steps.verify-changed-files.outputs.files_changed == 'true'
if: github.event.pull_request.head.repo.owner.login == github.repository_owner && steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add ${{ steps.verify-changed-files.outputs.changed_files }}
git commit -m "Updated README."
- name: Push README changes
if: !startsWith(github.ref, 'refs/tags/') && github.event.pull_request.head.repo.owner.login == github.repository_owner && steps.verify-changed-files.outputs.files_changed == 'true'
if: github.event.pull_request.head.repo.owner.login == github.repository_owner && steps.verify-changed-files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
continue-on-error: true
with:
Expand Down
10 changes: 1 addition & 9 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ inputs:
reusable:
description: 'Boolean Indicating whether the file is a reusable workflow'
required: false
version:
description: 'The version number to run'
required: false

runs:
using: 'composite'
Expand All @@ -50,7 +47,6 @@ runs:
EXTRA_ARGS=""
BIN_PATH="${{ inputs.bin_path }}"
REUSABLE="${{ inputs.reusable }}"
VERSION="${{ inputs.version }}"
# action.yml file
INPUT_COLUMNS=(${{ inputs.input_columns }})
OUTPUT_COLUMNS=(${{ inputs.output_columns }})
Expand Down Expand Up @@ -92,11 +88,7 @@ runs:
if [[ -z "$BIN_PATH" ]]; then
TEMP_DIR=$(mktemp -d)
if [[ -z "$VERSION" ]]; then
curl -sf https://gobinaries.com/github.com/tj-actions/auto-doc | PREFIX=$TEMP_DIR sh
else
curl -sf https://gobinaries.com/github.com/tj-actions/auto-doc@$VERSION | PREFIX=$TEMP_DIR sh
fi
curl -sf https://gobinaries.com/github.com/tj-actions/auto-doc | PREFIX=$TEMP_DIR sh
BIN_PATH="$TEMP_DIR/auto-doc"
fi
Expand Down

0 comments on commit df4e152

Please sign in to comment.