chore(deps): lock file maintenance (#266) #292
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: 📦 Create and publish Production Docker image | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-including-paths | |
paths-ignore: | |
- 'test/**' | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }}-web | |
jobs: | |
build-and-push-image: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
# - name: Log in to the Container registry | |
# uses: docker/login-action@v2 | |
# with: | |
# registry: ${{ env.REGISTRY }} | |
# username: ${{ github.actor }} | |
# password: ${{ secrets.GITHUB_TOKEN }} | |
# | |
# - name: Build and push Docker image | |
# uses: docker/build-push-action@v4 | |
# with: | |
# push: true | |
# tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | |
- name: Log in to the Container registry | |
run: | | |
echo "$TOKEN" | docker login ${{ env.REGISTRY }} --username "$USERNAME" --password-stdin | |
env: | |
TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
USERNAME: ${{ github.actor }} | |
- name: Build image | |
run: | | |
docker build --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest . | |
- name: Deploy image | |
run: | | |
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest |