Skip to content

Move login to ghcr

Move login to ghcr #8

Workflow file for this run

name: Test Workflow
on:
push:
branches:
- "dev-rkumar-AAE-16008-Stop-building-example-application-project-on-every-run-of-helm-tests"
env:
IMAGE_NAME: example-application-project
jobs:
empty-job:
runs-on: ubuntu-latest
steps:
- name: Print Hello world
run: echo Hello World!
- name: Print Branch and Repo name
run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
docker:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
packages: write
security-events: write
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: v0.11.0
# apply fix from https://github.com/moby/buildkit/issues/3969
driver-opts: |
image=moby/buildkit:v0.11.6
network=host
- name: Login to docker.io
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to ghcr.io
# if: env.PUSH_IMAGE == 'true'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image ${{ env.IMAGE_NAME }}
uses: docker/build-push-action@v4
with:
context: ./example-application-project
tags: ghcr.io/alfresco/example-process-application
push: true