aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/pr.yml
diff options
context:
space:
mode:
authorJoão Costa <[email protected]>2024-10-28 16:16:27 +0000
committerGitHub <[email protected]>2024-10-28 16:16:27 +0000
commitce8edf4145469dbaeced2e68c9a138d0fd76d38f (patch)
treeae8da28276249570310ef421d80d2d8793bdfb57 /.github/workflows/pr.yml
parentae40463712875613c7d485264d61a7965df8a57d (diff)
parent534d8fafaa7f09f7ba940d044b08e6c48f800c7a (diff)
downloadmuse-ce8edf4145469dbaeced2e68c9a138d0fd76d38f.tar.xz
muse-ce8edf4145469dbaeced2e68c9a138d0fd76d38f.zip
Merge branch 'master' into feature/select-dotenv-path
Diffstat (limited to '.github/workflows/pr.yml')
-rw-r--r--.github/workflows/pr.yml91
1 files changed, 0 insertions, 91 deletions
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
deleted file mode 100644
index 7c611ac..0000000
--- a/.github/workflows/pr.yml
+++ /dev/null
@@ -1,91 +0,0 @@
-name: PR Workflow
-
-on: pull_request_target
-
-jobs:
- release-snapshot:
- name: Release snapshot
- strategy:
- matrix:
- runner-platform:
- - ubuntu-latest
- - buildjet-4vcpu-ubuntu-2204-arm
- include:
- - runner-platform: ubuntu-latest
- build-arch: linux/amd64
- tagged-platform: amd64
- - runner-platform: buildjet-4vcpu-ubuntu-2204-arm
- build-arch: linux/arm64
- tagged-platform: arm64
- runs-on: ${{ matrix.runner-platform }}
- steps:
- - name: Set up Buildx
- uses: docker/setup-buildx-action@v1
-
- - name: Cache Docker layers
- # AWS data transfer is pricy
- if: ${{ matrix.runner-platform != 'buildjet-4vcpu-ubuntu-2204-arm' }}
- uses: actions/cache@v2
- with:
- path: /tmp/.buildx-cache
- key: ${{ runner.os }}-buildx-prs-${{ matrix.build-arch }}-${{ github.event.pull_request.head.sha }}
- restore-keys: |
- ${{ runner.os }}-buildx-prs-${{ matrix.build-arch }}
-
- - name: Login to DockerHub
- uses: docker/login-action@v1
- with:
- username: ${{ secrets.DOCKERHUB_USERNAME }}
- password: ${{ secrets.DOCKERHUB_TOKEN }}
-
- - uses: actions/checkout@v2
- with:
- ref: ${{ github.event.pull_request.head.sha }}
-
- - name: Get current time
- uses: josStorer/get-current-time@v2
- id: current-time
-
- - name: Build and push
- id: docker_build
- uses: docker/build-push-action@v2
- with:
- context: .
- push: true
- tags: codetheweb/muse:${{ github.event.pull_request.head.sha }}-${{ matrix.tagged-platform }}
- cache-from: type=local,src=/tmp/.buildx-cache
- cache-to: type=local,dest=/tmp/.buildx-cache,mode=min
- platforms: ${{ matrix.build-arch }}
- build-args: |
- COMMIT_HASH=${{ github.sha }}
- BUILD_DATE=${{ steps.current-time.outputs.time }}
-
- combine-and-comment:
- name: Combine platform tags and leave comment
- runs-on: ubuntu-latest
- needs: release-snapshot
- steps:
- - name: Set up Buildx
- uses: docker/setup-buildx-action@v1
-
- - name: Login to DockerHub
- uses: docker/login-action@v1
- with:
- username: ${{ secrets.DOCKERHUB_USERNAME }}
- password: ${{ secrets.DOCKERHUB_TOKEN }}
-
- - name: Combine tags
- run: docker buildx imagetools create -t 'codetheweb/muse:pr-${{ github.event.number }}' -t 'codetheweb/muse:${{ github.event.pull_request.head.sha }}' 'codetheweb/muse:${{ github.event.pull_request.head.sha }}-arm64' 'codetheweb/muse:${{ github.event.pull_request.head.sha }}-amd64'
-
- - name: Create comment
- uses: marocchino/sticky-pull-request-comment@v2
- with:
- header: "pr-release"
- message: |
- #### :package: A new release has been made for this pull request.
-
- To play around with this PR, pull `codetheweb/muse:pr-${{ github.event.number }}` or `codetheweb/muse:${{ github.event.pull_request.head.sha }}`.
-
- Images are available for x86_64 and ARM64.
-
- > Latest commit: ${{ github.event.pull_request.head.sha }}