diff --git a/pages/_meta.json b/pages/_meta.json index 6c70fd1..e362fe6 100644 --- a/pages/_meta.json +++ b/pages/_meta.json @@ -1,6 +1,5 @@ { "index": "Intro", "cli": "CLI", - "hosting": "Hosting", - "infrastructure": "Infrastructure" + "dev_ops": "Dev Ops" } diff --git a/pages/dev_ops/_meta.json b/pages/dev_ops/_meta.json new file mode 100644 index 0000000..7a1dcd3 --- /dev/null +++ b/pages/dev_ops/_meta.json @@ -0,0 +1,4 @@ +{ + "github-actions": "Github Actions", + "hosting": "Hosting" +} diff --git a/pages/infrastructure/github-actions/composite-actions.md b/pages/dev_ops/github-actions/composite-actions.md similarity index 100% rename from pages/infrastructure/github-actions/composite-actions.md rename to pages/dev_ops/github-actions/composite-actions.md diff --git a/pages/infrastructure/github-actions/github-pages.md b/pages/dev_ops/github-actions/github-pages.md similarity index 100% rename from pages/infrastructure/github-actions/github-pages.md rename to pages/dev_ops/github-actions/github-pages.md diff --git a/pages/infrastructure/github-actions/latex.md b/pages/dev_ops/github-actions/latex.md similarity index 100% rename from pages/infrastructure/github-actions/latex.md rename to pages/dev_ops/github-actions/latex.md diff --git a/pages/dev_ops/github-actions/publish-docker-images.md b/pages/dev_ops/github-actions/publish-docker-images.md new file mode 100644 index 0000000..00e3d69 --- /dev/null +++ b/pages/dev_ops/github-actions/publish-docker-images.md @@ -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 }} +``` diff --git a/pages/hosting/outline.md b/pages/dev_ops/hosting/outline.md similarity index 100% rename from pages/hosting/outline.md rename to pages/dev_ops/hosting/outline.md diff --git a/pages/infrastructure/_meta.json b/pages/infrastructure/_meta.json deleted file mode 100644 index 6db4e75..0000000 --- a/pages/infrastructure/_meta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "github-actions": "Github Actions" -} diff --git a/pages/infrastructure/github-actions/publish-npm-package.md b/pages/infrastructure/github-actions/publish-npm-package.md deleted file mode 100755 index 4df1962..0000000 --- a/pages/infrastructure/github-actions/publish-npm-package.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -id: publish-npm-github-action -tags: - - Github Actions - - NPM ---- - -# Publish NPM package with Github Action diff --git a/theme.config.jsx b/theme.config.jsx index 2b1e54c..933eeae 100644 --- a/theme.config.jsx +++ b/theme.config.jsx @@ -1,12 +1,15 @@ export default { logo: Memoir, - 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: (