mirror of
https://github.com/cupcakearmy/memoir.git
synced 2024-12-21 23:56:25 +00:00
docker images
This commit is contained in:
parent
5a4ddbbe06
commit
d8d96e7323
@ -1,6 +1,5 @@
|
||||
{
|
||||
"index": "Intro",
|
||||
"cli": "CLI",
|
||||
"hosting": "Hosting",
|
||||
"infrastructure": "Infrastructure"
|
||||
"dev_ops": "Dev Ops"
|
||||
}
|
||||
|
4
pages/dev_ops/_meta.json
Normal file
4
pages/dev_ops/_meta.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"github-actions": "Github Actions",
|
||||
"hosting": "Hosting"
|
||||
}
|
63
pages/dev_ops/github-actions/publish-docker-images.md
Normal file
63
pages/dev_ops/github-actions/publish-docker-images.md
Normal file
@ -0,0 +1,63 @@
|
||||
# Publish Docker images
|
||||
|
||||
This is how to publish a docker image simultaneously to the official Docker and Github registries.
|
||||
|
||||
**Supported features**
|
||||
|
||||
- **x86** and **arm** images
|
||||
- Push to **both** registries.
|
||||
- Semver tag labeling
|
||||
|
||||
We will assume that our image is called `foo/bar`, so our username is `foo` and the actual package is `bar`
|
||||
|
||||
```yaml
|
||||
name: Publish Docker image
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
with:
|
||||
install: true
|
||||
|
||||
- name: Docker Labels
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
foo/bar
|
||||
ghcr.io/${{ github.repository }}
|
||||
# This assumes your repository is also github.com/foo/bar
|
||||
# You could also use ghcr.io/foo/some-package as long as you are the user/org "foo"
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
```
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"github-actions": "Github Actions"
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
---
|
||||
id: publish-npm-github-action
|
||||
tags:
|
||||
- Github Actions
|
||||
- NPM
|
||||
---
|
||||
|
||||
# Publish NPM package with Github Action
|
@ -1,12 +1,15 @@
|
||||
export default {
|
||||
logo: <span>Memoir</span>,
|
||||
docsRepositoryBase: 'https://github.com/cupcakearmy/memoir/blob/core/docs/pages',
|
||||
docsRepositoryBase: 'https://github.com/cupcakearmy/memoir/blob/main',
|
||||
project: {
|
||||
link: 'https://github.com/cupcakearmy/memoir',
|
||||
},
|
||||
sidebar: {
|
||||
defaultMenuCollapseLevel: 1,
|
||||
},
|
||||
feedback: {
|
||||
content: 'Question? An error? Give feedback →',
|
||||
},
|
||||
footer: {
|
||||
text: (
|
||||
<span>
|
||||
|
Loading…
Reference in New Issue
Block a user