Skip to content

Commit

Permalink
feat(c2): dockerhub publish ci
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterSkriba committed Feb 20, 2024
1 parent 53d7b9a commit 85e4d72
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,41 @@ jobs:
- run: yarn install --frozen-lockfile
- run: yarn run build --if-present
- run: yarn test

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

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

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
${{ secrets.DOCKERHUB_USERNAME }}/ambulance-ufe
tags: |
type=schedule
type=ref,event=branch
type=ref,event=branch,suffix={{date '.YYYYMMDD.HHmm'}} # napr `main.20210930.1200`
type=ref,event=tag
type=semver,pattern={{version}} # napr pri tagu `v1.0.0`
type=semver,pattern={{major}}.{{minor}} # napr `1.0`
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}} # `latest` pre každý komit do main vetvy
- uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64/v8
file: ./build/docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Ambulance UFE

- [x] Cvičenie 1
- [ ] Cvičenie 2

0 comments on commit 85e4d72

Please sign in to comment.