Skip to content

Commit

Permalink
Moved container to ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Kosmaczewski committed Mar 28, 2023
1 parent e08e1c2 commit 7044264
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 43 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# 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.

# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.

name: Create and publish a container image

on:
push:
branches: [ master ]
tags: [ '*' ]
pull_request:
branches: [ master ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
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

- name: Log in to the Container registry
uses: docker/login-action@219c305e1ce92a755f3aa4ba17387c95df31e987
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
40 changes: 0 additions & 40 deletions .github/workflows/docker-image.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/vshn/antora:3.1.2.2
FROM ghcr.io/vshn/antora:3.1.2.2

RUN addgroup -S preview && adduser -S preview -G preview && \
mkdir -p /preview/bundles && chown -R preview:preview /preview
Expand Down
2 changes: 0 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

This tool can be used to quickly preview an Antora documentation website.

The image is available in https://hub.docker.com/r/vshn/antora-preview[Docker Hub].

== How to use

Run the following command on top of any project containing Antora documentation:
Expand Down

0 comments on commit 7044264

Please sign in to comment.