Skip to content

Update create-build-screenshots-tarball.yml #31

Update create-build-screenshots-tarball.yml

Update create-build-screenshots-tarball.yml #31

# This is a basic workflow to help you get started with Actions
name: build-screenshots-tarball
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "4.30" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
build-screenshots-branch:
description: "Branch to use for build-screenshots"
default: "4.30"
required: true
logLevel:
description: 'Log level'
required: true
default: 'debug'
type: choice
options:
- info
- warning
- debug
env:
version: "${{ github.event.inputs.build-screenshots-branch }}"
checkout-path: "code"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Output details
run: |
echo "repo ${{ github.repository }}"
echo "workspace $GITHUB_WORKSPACE"
echo "sha $GITHUB_SHA"
- name: Set the release date
id: release-date
run: echo "RELEASE_DATE=$(date '+%Y-%m-%d')" >> "$GITHUB_OUTPUT"
- name: Output the release date
run: echo "release date ${{ steps.release-date.outputs.RELEASE_DATE }}"
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout build-screenshots branch
uses: actions/checkout@v3
with:
path: ${{ env.checkout-path }}
ref: "${{ env.version }}"
# Runs a single command using the runners shell
- name: Compress screenshots action step

Check failure on line 61 in .github/workflows/create-build-screenshots-tarball.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/create-build-screenshots-tarball.yml

Invalid workflow file

You have an error in your yaml syntax on line 61
uses: a7ul/tar-action@v1.1.0
id: compress
with:
cwd: ${{ env.checkout-path }}
command: c
files: |
./images
README.md
outPath: build-screenshots.tar.gz
# Use the output from the `compress` step
- name: Get the output
run: echo "The output was ${{ steps.compress.outputs.done }}"
- name: release
uses: actions/create-release@v1
id: create-release
with:
draft: false
prerelease: false
release_name: "${{ env.RELEASE_NAME }} ${{ env.RELEASE_DATE }}"
tag_name: "${{ env.RELEASE_VERSION }}"
body: "Release ${{ env.RELEASE_VERSION }} ${{ env.RELEASE_DATE }}"
env:
GITHUB_TOKEN: ${{ github.token }}
RELEASE_NAME: "build screenshots"
RELEASE_VERSION: ${{ env.version }}
RELEASE_DATE: ${{ steps.release-date.outputs.RELEASE_DATE }}
- name: upload release artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
TARBALL: "build-screenshots-${{ env.version }}"
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ./build-screenshots.tar.gz
asset_name: ${{ env.TARBALL }}
asset_content_type: application/gzip