Skip to content

Commit

Permalink
[INTERNAL] Publish to ghr
Browse files Browse the repository at this point in the history
  • Loading branch information
amuraru committed Dec 22, 2021
1 parent d0d9e9d commit 4258057
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 151 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/docker-publish-to-ghr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: docker-image-push

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
push:
tags: [ '*' ]

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: adobe/kminion

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
44 changes: 0 additions & 44 deletions .github/workflows/image-on-push-to-branch.yaml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/image-on-push-to-master.yaml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/package-helm-chart-on-push.yaml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/release-on-tag.yaml

This file was deleted.

0 comments on commit 4258057

Please sign in to comment.