Skip to content

Commit

Permalink
ci: Use our reusable GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
geokrety-bot committed Aug 8, 2023
1 parent a3824ff commit 6fad51b
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 100 deletions.
51 changes: 7 additions & 44 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,13 @@ on:
tags:
- "v*.*.*"
pull_request:
branches:
- "main"

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
geokrety/grafana
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

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

- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push - base
uses: docker/build-push-action@v4
with:
file: Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
uses: geokrety/geokrety-gha-workflows/.github/workflows/docker-build.yml@main
with:
image_name: geokrety/grafana
dockerhub_username: ${{ vars.DOCKERHUB_USERNAME }}
dockerfile: Dockerfile
secrets:
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
15 changes: 4 additions & 11 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
name: pre-commit
name: lint

on:
pull_request:
push:
branches:
- '*'
- '!main'

jobs:

pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4

- uses: pre-commit/[email protected]
lint:
uses: geokrety/geokrety-gha-workflows/.github/workflows/pre-commit.yml@main
12 changes: 12 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Automatic release

on:
push:
branches:
- main

jobs:
build-release:
uses: geokrety/geokrety-gha-workflows/.github/workflows/release.yml@main
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
45 changes: 0 additions & 45 deletions .github/workflows/semantic-release.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/workflows/version-set.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Update version-set

on:
push:
tags:
- "v*.*.*"

jobs:
update-version-set:
uses: geokrety/geokrety-gha-workflows/.github/workflows/version-set.yml@main
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
1 change: 1 addition & 0 deletions .versionset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
geokrety_grafana_image

0 comments on commit 6fad51b

Please sign in to comment.