Reorganize the website to focus on the main No Agenda entities while … #283
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: Publish Docker Images | |
on: push | |
jobs: | |
publish-images: | |
name: Publish Docker Images | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'noagenda' | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v2 | |
- | |
name: Extract Branch Name | |
shell: bash | |
run: | | |
APP_TAG=${GITHUB_REF#refs/heads/} | |
if [[ "$APP_TAG" == 'production' ]]; then | |
echo '::set-output name=APP_TAG::latest' | |
else | |
echo "::set-output name=APP_TAG::$APP_TAG" | |
fi | |
id: extract-branch | |
- | |
name: Build Images | |
run: | | |
export APP_TAG=${{ steps.extract-branch.outputs.APP_TAG }} | |
docker-compose -f docker-compose.yaml -f docker-compose.services.yaml build --build-arg GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Login to GitHub Packages | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Push Images | |
run: | | |
export APP_TAG=${{ steps.extract-branch.outputs.APP_TAG }} | |
docker-compose -f docker-compose.yaml -f docker-compose.services.yaml push |