Merge pull request #260 from fedimod/dependabot/npm_and_yarn/rollup-4… #170
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: Build edge container image | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| compute-suffix: | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'fedimod/fires' | |
| steps: | |
| # Repository needs to be cloned so `git rev-parse` below works | |
| - name: Clone repository | |
| uses: actions/checkout@v6 | |
| - id: version_vars | |
| run: | | |
| fires_short_sha=$(git rev-parse --short ${{github.event.after}}) | |
| echo fires_short_sha=$fires_short_sha >> $GITHUB_OUTPUT | |
| echo fires_version_metadata=edge-$fires_short_sha >> $GITHUB_OUTPUT | |
| outputs: | |
| metadata: ${{ steps.version_vars.outputs.fires_version_metadata }} | |
| short_sha: ${{ steps.version_vars.outputs.fires_short_sha }} | |
| build-image: | |
| needs: compute-suffix | |
| uses: ./.github/workflows/build-container-image.yml | |
| with: | |
| file_to_build: Dockerfile | |
| cache: true | |
| target_stage: fires-server | |
| push_to_images: | | |
| ghcr.io/fedimod/fires-server | |
| version_metadata: ${{ needs.compute-suffix.outputs.metadata }} | |
| version_prerelease: ${{ needs.compute-suffix.outputs.prerelease }} | |
| labels: | | |
| org.opencontainers.image.description="Edge build image used for testing purposes" | |
| flavor: | | |
| latest=auto | |
| tags: | | |
| type=edge | |
| type=edge,branch=main | |
| type=edge,suffix=-${{ needs.compute-suffix.outputs.short_sha }} | |
| secrets: inherit |