Skip to content

Commit

Permalink
Build and push image to ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh committed May 16, 2024
1 parent 1a1202c commit 63c753b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/image-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ on:
jobs:

release:
runs-on: [self-hosted, ARM64, stable]
runs-on: ubuntu-latest
environment: DOCKER_HUB
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -63,11 +66,12 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Registry
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.registry-username }}
password: ${{ secrets.registry-password }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v4
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ on:
jobs:

release:
runs-on: [self-hosted, ARM64, stable]
runs-on: ubuntu-latest
environment: DOCKER_HUB

permissions:
contents: read
packages: write
steps:

- name: Checkout
Expand All @@ -38,11 +40,12 @@ jobs:
- name: Set up Docker Buildx
uses: docker/[email protected]

- name: Login to DockerHub
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Release new Docker image

on:
push:
tags:
- 'v*'
branches:
- newapproach
workflow_dispatch:

env:
BASE_IMAGE_NAME: plone/frontend
BASE_IMAGE_NAME: kitconcept/frontend
PLATFORMS: linux/amd64,linux/arm64
IS_LATEST: false

Expand Down

0 comments on commit 63c753b

Please sign in to comment.