Skip to content

Commit

Permalink
chore: update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
anasmuhmd committed Apr 6, 2024
1 parent 20adcfa commit 68d6ac8
Showing 1 changed file with 25 additions and 43 deletions.
68 changes: 25 additions & 43 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,29 @@
name: Release
name: ci

on:
workflow_call:
push:
branches:
- "main"

jobs:
release:
runs-on: ubuntu-latest

permissions:
packages: write

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Docker Metadata
id: docker-metadata
uses: docker/metadata-action@v4
with:
images: ghcr.io/murar8/local-jwks-server
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=edge,branch=main
type=sha,prefix=
- name: Log in to GitHub Container Registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ steps.docker-metadata.outputs.tags }}
labels: ${{ steps.docker-metadata.outputs.labels }}
cache-from: type=gha,scope=$GITHUB_REF_NAME-app
cache-to: type=gha,scope=$GITHUB_REF_NAME-app,mode=max
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{secrets.DOCKERHUB_USERNAME}}/local-jwks-server:latest

0 comments on commit 68d6ac8

Please sign in to comment.