Skip to content

Commit

Permalink
Enhancements. (#6)
Browse files Browse the repository at this point in the history

Co-authored-by: Hamster [bot] <[email protected]>
  • Loading branch information
offensive-vk and TheHamsterBot authored Dec 30, 2024
1 parent 2af126c commit 4280f80
Show file tree
Hide file tree
Showing 7 changed files with 283 additions and 326 deletions.
69 changes: 8 additions & 61 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,67 +4,14 @@ on:
push:
tags:
- '*'
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:

env:
USERNAME: ${{ github.repository_owner }}
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
PASSWORD: ${{ secrets.GITHUB_TOKEN }}

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout Repository
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 the Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.USERNAME }}
password: ${{ env.PASSWORD }}

- name: Extract Metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=pr
type=edge
latest
${{ github.ref_name }}
labels: |
org.opencontainers.image.title=auto-user-activity
org.opencontainers.image.description=Fetch and Updates Your Readme Markdown with the Recent GitHub activity of a github user.
org.opencontainers.image.vendor=Vedansh
- name: Verify Tags and Labels
run: |
echo "## Github Action Summary - Docker CI " >> $GITHUB_STEP_SUMMARY
echo "${{ steps.meta.outputs.labels }} " >> $GITHUB_STEP_SUMMARY
- name: Build and Push Image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
call-ghcr-workflow:
uses: offensive-vk/Assets/.github/workflows/ghcr.yml@master
with:
author: "Vedansh"
title: "auto-user-activity"
description: "Fetch and Updates Your Readme Markdown with the Recent GitHub activity of a github user."
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
committer-email: "[email protected]"
commit-msg: "Updated Recent Activity."
max-lines: 50
target-file: 'RECENT.md'
target-file: 'README.md'

- name: Add Activity to File
uses: ./
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inputs:
description: "Your Github PAT or Auth Token"
required: false
username:
description: "Your GitHub username"
description: "Your GitHub Username"
required: false
committer:
description: "Name of the committer"
Expand Down
Loading

0 comments on commit 4280f80

Please sign in to comment.