Skip to content

Commit

Permalink
ci(docker): add pre-release workflow
Browse files Browse the repository at this point in the history
This commit adds a pre-release workflow that will push images to Docker Hub with tags based on the pull request head ref.

This will allow us to easily test and deploy pre-release versions of the config editor.
  • Loading branch information
luandro committed Jun 3, 2024
1 parent b9e6037 commit 2572981
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/pre-release-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Pre-Release on Docker Hub

on:
push:
branches-ignore:
- 'main'

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
platforms: linux/amd64, linux/arm64
tags: communityfirst/mapeo-config-editor:${{ github.event.pull_request.head.ref }}
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: communityfirst/mapeo-config-editor

0 comments on commit 2572981

Please sign in to comment.