diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e8532f..6b12dcd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} diff --git a/README.md b/README.md index e40fb1b..218a2a1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ # Ambulance UFE - [x] Cvičenie 1 +- [ ] Cvičenie 2