Skip to content

Commit

Permalink
github workflows, take 2
Browse files Browse the repository at this point in the history
  • Loading branch information
tyssejc committed Nov 17, 2022
1 parent 20d0d30 commit e689a01
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 16 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/ci.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish Image
on:
release:
types:
- published

jobs:
publish_docker:
name: Build and push Docker image
if: github.event.repository.fork == false
runs-on: ubuntu-latest
steps:

- name: Checkout repository
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: latest

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

- name: Build Docker image
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
ghcr.io/${{ github.event.repository.full_name }}:latest
ghcr.io/${{ github.event.repository.full_name }}:${{ github.event.release.tag_name }}
19 changes: 19 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release Drafter

on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "main"
- uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Mark stale issues and pull requests

on:
schedule:
- cron: "30 1 * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Marking this issue as stale as it has not been updated for 30 days.'
stale-pr-message: 'Marking this PR as stale as it has not been updated for 30 days.'
stale-issue-label: 'stale'
stale-pr-label: 'stale'
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build Image
on:
pull_request:
paths-ignore:
- '**/*.md'

jobs:
publish_docker:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: latest

- name: Build Docker image
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: false
tags: |
ghcr.io/${{ github.event.repository.full_name }}:latest

0 comments on commit e689a01

Please sign in to comment.