Skip to content

update docker action versions and pray #2

update docker action versions and pray

update docker action versions and pray #2

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- master
- feature/gh-docker-actions
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Check Out Repository
uses: actions/checkout@v3
- name: Load package.json version
id: package_version
run: echo "PACKAGE_VERSION=$(jq -r '.version' package.json)" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/minecraft-discord-chat-parser:latest
${{ secrets.DOCKERHUB_USERNAME }}/minecraft-discord-chat-parser:${{ env.PACKAGE_VERSION }}
- name: Logout from Docker Hub
run: docker logout