Release: devcontainer + wasicontainer #35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| container: | |
| description: "Container image name" | |
| required: true | |
| default: 'autoconf' | |
| type: choice | |
| options: | |
| - autoconf | |
| - devcontainer | |
| - wasicontainer | |
| run-name: "Release: ${{ inputs.container }}${{ inputs.container == 'devcontainer' && ' + wasicontainer' || '' }}" | |
| jobs: | |
| authorize: | |
| runs-on: ubuntu-latest | |
| if: contains('["brettcannon", "corona10", "erlend-aasland"]', github.actor) | |
| steps: | |
| - run: echo "Authorized" | |
| release-to-ghcr: | |
| name: Release ${{ inputs.container }} | |
| needs: authorize | |
| uses: ./.github/workflows/build-and-push.yml | |
| permissions: | |
| contents: read | |
| packages: write | |
| with: | |
| container: ${{ inputs.container }} | |
| # Explicit WASI container release **if** the dev container was also released due to being a dependency. | |
| release-wasicontainer: | |
| name: Release wasicontainer | |
| needs: [authorize, release-to-ghcr] | |
| if: inputs.container == 'devcontainer' | |
| uses: ./.github/workflows/build-and-push.yml | |
| permissions: | |
| contents: read | |
| packages: write | |
| with: | |
| container: wasicontainer |