Skip to content

⬆️ GitHub Actionsの依存 (#541) #9

⬆️ GitHub Actionsの依存 (#541)

⬆️ GitHub Actionsの依存 (#541) #9

Workflow file for this run

name: Push Docker Image
on:
push:
tags:
- v*
env:
IMAGE_NAME: booq
jobs:
image:
name: Build Docker Image
runs-on: ubuntu-latest
steps:
- name: Set IMAGE_TAG env
run: echo "IMAGE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: traptitech
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
file: docker/production/Dockerfile
tags: |
ghcr.io/traptitech/${{ env.IMAGE_NAME }}:latest
ghcr.io/traptitech/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}