Skip to content

Commit

Permalink
Created CI
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrashy authored Jan 5, 2023
1 parent 67ac120 commit 9d50965
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build and publish a Docker image

on:
push:
tags:
-'*'
- '**'
release:
types: [published]
env:
REGISTRY: docker.io
REP_NAME: swapica/aggregator
IMAGE_NAME: swapica/aggregator:${{ github.ref_name }}

jobs:
build:
name: Build and publish image
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_LOGIN }}
password: ${{ secrets.DOCKERHUB_PASS }}

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

- name: Build and push Docker images
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ env.IMAGE_NAME }}

0 comments on commit 9d50965

Please sign in to comment.