Skip to content

fix logout

fix logout #136

Workflow file for this run

name: Deploy
on: push
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
DEFAULT_BRANCH: ${{ format('refs/heads/{0}', github.event.repository.default_branch) }}
jobs:
build_or_push_image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker Login
uses: docker/login-action@v1.14.1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=${{ github.ref == env.DEFAULT_BRANCH }}
- name: Build and push Docker images
uses: docker/build-push-action@v2.9.0
with:
context: .
push: ${{ github.ref == env.DEFAULT_BRANCH }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}