feat: config huey to use redis #158
Workflow file for this run
This file contains 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 Image (Development) | |
on: | |
pull_request: | |
types: | |
- labeled | |
workflow_dispatch: | |
jobs: | |
release-docker: | |
name: Release Image | |
runs-on: ubuntu-latest | |
if: | | |
github.event_name == 'workflow_dispatch' || | |
contains(github.event.pull_request.labels.*.name, 'deploy') | |
steps: | |
- name: Select branch | |
id: select_branch | |
run: | | |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | |
echo "branch=main" >> $GITHUB_OUTPUT | |
else | |
echo "branch=${{ github.event.pull_request.head.ref }}" >> $GITHUB_OUTPUT | |
fi | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ steps.select_branch.outputs.branch }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push PR image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: | | |
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:development | |
labels: | | |
org.opencontainers.image.source=${{ github.event.repository.html_url }} | |
org.opencontainers.image.revision=${{ github.sha }} | |
build-args: | | |
BUILDKIT_INLINE_CACHE=1 | |
- name: Save branch name artifact | |
run: | | |
mkdir -p ./branch | |
echo -n ${{ steps.select_branch.outputs.branch }} > ./branch/branch | |
- name: Upload branch name artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: branch | |
path: branch/ | |
retention-days: 1 |