Skip to content

Commit

Permalink
ci: pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
wokim committed Apr 23, 2024
1 parent 0f16ece commit 6310a54
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and Push Docker

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 Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_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: |
${{ secrets.DOCKERHUB_USERNAME }}/atmocube-metrics:${{ env.VERSION }}
${{ secrets.DOCKERHUB_USERNAME }}/atmocube-metrics:latest
platforms: linux/arm64

0 comments on commit 6310a54

Please sign in to comment.