Skip to content

All in one, manual

All in one, manual #4

Workflow file for this run

name: All in one, manual
on:
workflow_dispatch:
inputs:
tag:
type: string
required: false
release:
type: choice
options:
- 'yes'
- 'no'
run-id:
type: string
required: false
description: Download artifact from this run instead of rebuilding.
env:
REPO: RocketChat/server-snap
SNAP_ARTIFACT_KEY: snap
jobs:
prereqs:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@v3
with:
repository: ${{ env.REPO }}
- shell: bash
id: version
run: |
tag="${{ inputs.tag }}"
if [[ -z "$tag" ]]; then # like in case of workflow_dispatch with no tag set
tag="$(awk -F: '/^version:/ {print $2}' snap/snapcraft.yaml | tr -d '[:space:]')"
else
tag="${{inputs.tag}}"
fi
echo "tag: $tag"
echo "version=$tag" >> $GITHUB_OUTPUT
build:
if: inputs.run-id == ''
needs: [ prereqs ]
uses: RocketChat/server-snap/.github/workflows/build.yml@develop
with:
snap-artifact-key: ${{ env.SNAP_ARTIFACT_KEY }}

Check failure on line 53 in .github/workflows/aio_manual.yml

View workflow run for this annotation

GitHub Actions / All in one, manual

Invalid workflow file

The workflow is not valid. .github/workflows/aio_manual.yml (Line: 53, Col: 26): Unrecognized named-value: 'env'. Located at position 1 within expression: env.SNAP_ARTIFACT_KEY .github/workflows/aio_manual.yml (Line: 64, Col: 26): Unrecognized named-value: 'env'. Located at position 1 within expression: env.SNAP_ARTIFACT_KEY
tag: ${{ needs.prereqs.outputs.version }}
test:
needs: [ build, prereqs ]
if: |
always() &&
(needs.build.result == 'skipped' || needs.build.result == 'success')
uses: RocketChat/server-snap/.github/workflows/test.yml@develop
with:
tag: ${{ needs.prereqs.outputs.version }}
snap-artifact-key: ${{ env.SNAP_ARTIFACT_KEY }}
snap-basename: ${{ needs.build.result == 'success' && needs.build.outputs.snap-basename || format('rocketchat-server_{0}.snap', inputs.tag) }}
run-id: ${{ inputs.run-id }}
secrets:
snapcraft-credential: ${{secrets.SNAPCRAFT_STORE_CREDENTIALS }}
release:
if: |
always() &&
(needs.build.result == 'skipped' || needs.build.result == 'success') &&
inputs.release == 'yes'
needs:
- build
- test
uses: RocketChat/server-snap/.github/workflows/release.yml@develop
with:
tag: ${{ inputs.tag }}
snap-artifact-key: ${{ env.SNAP_ARTIFACT_KEY }}
snap-basename: ${{ needs.build.result == 'success' && needs.build.outputs.snap-basename || format('rocketchat-server_{0}.snap', inputs.tag) }}
secrets:
snapcraft-credential: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
github-token: ${{ secrets.GH_TOKEN_PERSONAL }}