Skip to content

Commit

Permalink
update docker ghcr publishing workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
zakkarry committed Sep 20, 2024
1 parent 7ff1eee commit b3c09f6
Show file tree
Hide file tree
Showing 15 changed files with 73 additions and 590 deletions.
123 changes: 0 additions & 123 deletions .github/CONTRIBUTING.md

This file was deleted.

2 changes: 0 additions & 2 deletions .github/FUNDING.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

76 changes: 0 additions & 76 deletions .github/ISSUE_TEMPLATE/issue.bug.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/issue.feature.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/call_issue_pr_tracker.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/call_issues_cron.yml

This file was deleted.

73 changes: 73 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: ci

on:
push:
branches:
- "**"
tags:
- "v*"
pull_request:
branches:
- "master"
workflow_dispatch:

permissions:
packages: write
contents: read

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

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

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Loading

0 comments on commit b3c09f6

Please sign in to comment.