Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Henahax authored Mar 24, 2024
1 parent ea30ebb commit b967934
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI

on:
push:
branches: ['main']
pull_request:
branches: ['main']
workflow_dispatch:

jobs:
Docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20

- name: setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "${{ secrets.EMAIL }}"
- name: Dependecies
run: npm ci

- name: Build
run: npm run build

- name: Save version
id: version
run: echo ::set-output name=tag::$(echo $(node -p -e "require('./package.json').version"))

- name: Increase version
run: npm version patch

- name: Push new version
run: git push

- name: Login to DockerHub Registry
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin

- name: Build Docker image
run: docker build . --file Dockerfile --tag henahax/gw2tools:latest

- name: Push to Docker Hub
run: docker push henahax/gw2tools:latest

0 comments on commit b967934

Please sign in to comment.