Skip to content

Commit

Permalink
Update template
Browse files Browse the repository at this point in the history
  • Loading branch information
Y0sh1dk committed Dec 17, 2023
1 parent 67de89d commit ba4da7a
Showing 1 changed file with 9 additions and 20 deletions.
29 changes: 9 additions & 20 deletions .github/workflows/test.yaml.tmpl
Original file line number Diff line number Diff line change
@@ -1,43 +1,32 @@
name: [[[ .Env.WORKFLOW_NAME ]]] Test

name: gha-docker-image-exists Test
on:
workflow_dispatch:

jobs:
valid-tag:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
success:
runs-on: ubuntu-latest
steps:
- name: [[[ .Env.WORKFLOW_NAME ]]] valid tag
- name: GHA Docker Image Exists
id: gha-docker-image-exists
continue-on-error: true
uses: Y0sh1dk/gha-docker-image-exists@[[[ .Env.ACTION_VERSION ]]]
uses: Y0sh1dk/gha-docker-image-exists@main
with:
image: nginx:latest

- name: Check output
run: |
if [ ${{ steps.gha-docker-image-exists.outcome == 'success' }} ]; then
exit 0
else
exit 1
fi

invalid-tag:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
fail:
runs-on: ubuntu-latest
steps:
- name: [[[ .Env.WORKFLOW_NAME ]]] invalid tag
- name: GHA Docker Image Exists
id: gha-docker-image-exists
continue-on-error: true
uses: Y0sh1dk/gha-docker-image-exists@[[[ .Env.ACTION_VERSION ]]]
uses: Y0sh1dk/gha-docker-image-exists@main
with:
image: nginx:invalid-tag

- name: Check output
run: |
if [ ${{ steps.gha-docker-image-exists.outcome == 'failure' }} ]; then
Expand Down

0 comments on commit ba4da7a

Please sign in to comment.