rollback rollback #49
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: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| inputs: | |
| force_deploy: | |
| description: Force deploy | |
| type: boolean | |
| force_release: | |
| description: Force release | |
| type: boolean | |
| force_pr: | |
| description: Force pull request | |
| type: boolean | |
| concurrency: | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: true | |
| env: | |
| IMAGE: ghcr.io/flowcanon/flow-deploy-docs | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - id: pipeline | |
| uses: flowcanon/release-builder/pipeline@v3 | |
| with: | |
| force-pr: ${{ inputs.force_pr || false }} | |
| outputs: | |
| created-tag: ${{ steps.pipeline.outputs.created-tag }} | |
| current-version: ${{ steps.pipeline.outputs.current-version }} | |
| build_release: | |
| if: inputs.force_release || needs.release.outputs.created-tag | |
| name: Build release | |
| runs-on: ubuntu-latest | |
| needs: release | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build binaries | |
| run: | | |
| docker build --target builder-musl -t flow-deploy-musl -f Dockerfile.build . | |
| docker build --target builder-glibc -t flow-deploy-glibc -f Dockerfile.build . | |
| mkdir -p dist | |
| docker cp $(docker create flow-deploy-musl):/build/dist/flow-deploy-linux-musl dist/ | |
| docker cp $(docker create flow-deploy-glibc):/build/dist/flow-deploy-linux-glibc dist/ | |
| - name: Create GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: v${{ needs.release.outputs.current-version }} | |
| generate_release_notes: true | |
| files: | | |
| dist/flow-deploy-linux-musl | |
| dist/flow-deploy-linux-glibc | |
| build_and_deploy: | |
| if: inputs.force_deploy || needs.release.outputs.created-tag | |
| name: Build & Deploy | |
| runs-on: ubuntu-latest | |
| needs: [release, build_release] | |
| environment: coruscant | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.IMAGE }} | |
| tags: | | |
| type=sha,prefix= | |
| - uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| - uses: flowcanon/deploy-action@master | |
| with: | |
| tag: ${{ steps.meta.outputs.version }} | |
| ssh-key: ${{ secrets.DEPLOY_SSH_KEY }} | |
| host: ${{ vars.HOST_NAME }} | |
| user: ${{ vars.HOST_USER }} | |
| ssh-port: ${{ vars.SSH_PORT }} | |
| registry-token: ${{ secrets.GITHUB_TOKEN }} | |
| upgrade: true |