Skip to content

Commit

Permalink
🔧 Add build and push action
Browse files Browse the repository at this point in the history
  • Loading branch information
Irori235 committed Mar 14, 2024
1 parent e36161c commit d9671b3
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build and push to ghcr

on:
push:
branches:
- main
workflow_dispatch:

jobs:
image:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Tag SHA
id: create-tag-sha
run: |
echo ${{ github.sha }} | cut -c 1-7 | awk '{print "sha="$0}' >> $GITHUB_OUTPUT
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: irori235
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
ghcr.io/irori235/cashly:latest
ghcr.io/irori235/cashly:${{ steps.create-tag-sha.outputs.sha }}

0 comments on commit d9671b3

Please sign in to comment.