Skip to content

Commit

Permalink
ci: github action
Browse files Browse the repository at this point in the history
  • Loading branch information
wokim committed Jun 8, 2024
1 parent 8ba4ace commit 3b09fb9
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and Push Docker

permissions:
contents: read
packages: write

on:
release:
types: [created]

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
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 GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Write release version
run: |
VERSION=${{ github.event.release.tag_name }}
echo "VERSION=${VERSION:1}" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ env.VERSION }}
platforms: linux/arm64

0 comments on commit 3b09fb9

Please sign in to comment.