imports #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
branches: ['main'] | |
workflow_dispatch: | |
jobs: | |
Docker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
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 |