Skip to content
This repository has been archived by the owner on Feb 7, 2025. It is now read-only.

switch to github actions #1

switch to github actions

switch to github actions #1

name: Test and Publish
on:
push:
jobs:
test-app:
name: Test App
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run tests
run: docker-compose run --rm test ./run-tests.sh
build-and-publish:
name: Build and Publish
needs: test-app
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ vars.DOCKER_ORG }}/auth-proxy
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}