Skip to content

Commit

Permalink
github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nbittich committed Dec 16, 2022
1 parent 5918871 commit 1c82d9f
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,28 @@ on:
push:
branches:
- 'main'
- 'feat/**'
- 'chore/**'

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2.1.0
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2.1.0
-
name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3.2.0
with:
push: true
tags: nbittich/websitev2:latest
33 changes: 33 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Docker image

on:
release:
types: [published]

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/[email protected]

- name: Log in to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: nbittich/websitev2

- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
15 changes: 15 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

git checkout main
git pull

npm version $1
npm i
git add .
git commit -m "version $1"

echo "push tag $1..."
git push origin v$1

git push

echo "done."

0 comments on commit 1c82d9f

Please sign in to comment.