Add SSO with Google within the Admin #33
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: Docker Image CI | |
on: [push] | |
jobs: | |
build-test-release: | |
name: Build, Test and Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
if: ${{ env.DOCKERHUB_TOKEN }} | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
env: | |
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Install pose | |
run: | | |
wget https://github.com/mrsarm/pose/releases/download/0.4.0/pose-0.4.0-x86_64-unknown-linux-gnu.tar.gz -O - \ | |
| tar -xz | |
- name: Define $TAG variable | |
run: echo "TAG=$(./pose slug $GITHUB_REF_NAME)" >> "$GITHUB_ENV" | |
- name: Print tag and image names | |
run: | | |
echo "- TAG --> $TAG" | |
echo "- IMAGE --> mrsarm/django-coleman:$TAG" | |
- name: Build the Docker image | |
run: ./docker-build.sh $TAG | |
- name: Run tests | |
run: docker run --rm -e PROCESS_TYPE=test --name django-coleman "mrsarm/django-coleman:$TAG" | |
- name: Release Docker image | |
if: ${{ env.DOCKERHUB_TOKEN }} | |
run: docker push "mrsarm/django-coleman:$TAG" | |
env: | |
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Get compose.yaml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
./pose get -H "Authorization: token $GITHUB_TOKEN" \ | |
"https://raw.githubusercontent.com/mrsarm/dcoleman-e2e/$TAG/compose.yaml" "$TAG:main" | |
- name: Get .env.example | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
./pose get -H "Authorization: token $GITHUB_TOKEN" \ | |
"https://raw.githubusercontent.com/mrsarm/dcoleman-e2e/$TAG/.env.example" "$TAG:main" | |
- name: Setup environment variables | |
run: cp .env.example .env | |
- name: Build compose file for CI | |
run: | | |
./pose --no-docker config --tag $TAG --tag-filter regex=mrsarm/ --progress -o ci.yaml | |
- name: Pull images | |
run: docker compose -f ci.yaml pull | |
&& docker compose -f ci.yaml pull dcoleman-e2e # services with profiles are not pulled by default | |
- name: Run e2e tests | |
run: docker compose -f ci.yaml run dcoleman-e2e | |
- name: Tag "latest" | |
if: ${{ env.DOCKERHUB_TOKEN && github.ref == 'refs/heads/master' }} | |
run: docker tag "mrsarm/django-coleman:$TAG" mrsarm/django-coleman:latest | |
env: | |
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Release "latest" | |
if: ${{ env.DOCKERHUB_TOKEN && github.ref == 'refs/heads/master' }} | |
run: docker push mrsarm/django-coleman:latest | |
env: | |
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} |