Skip to content

fix build dark css #102

fix build dark css

fix build dark css #102

Workflow file for this run

name: Release
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: gdgvda
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Extract information from package.json
id: package-info
run: |
echo "version=$(jq -r .version package.json)" >> $GITHUB_OUTPUT
echo "major=$(echo $(jq -r .version package.json) | cut -d'.' -f1)" >> $GITHUB_OUTPUT
echo "minor=$(echo $(jq -r .version package.json) | cut -d'.' -f1,2)" >> $GITHUB_OUTPUT
echo "name=$(jq -r .name package.json)" >> $GITHUB_OUTPUT
echo "title=$(jq -r .title package.json)" >> $GITHUB_OUTPUT
echo "description=$(jq -r .description package.json)" >> $GITHUB_OUTPUT
echo "owner=$(jq -r .owner package.json)" >> $GITHUB_OUTPUT
- name: Add version Tag
uses: rickstaa/action-create-tag@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
tag: ${{ steps.package-info.outputs.version }}
tag_exists_error: false
force_push_tag: true
- name: Create Release
uses: actions/create-release@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.package-info.outputs.version }}
release_name: Release ${{ steps.package-info.outputs.version }}
prerelease: false
draft: false
body: |
## Pull Docker Image
You can pull the release image using the following command:
```bash
$ docker pull gdgvda/tech-pizza-delivery-waiter:${{ steps.package-info.outputs.version }}
```
- name: Extract metadata (tags, labels) per Docker
id: meta
uses: docker/metadata-action@v5
with:
images: gdgvda/tech-pizza-delivery-waiter
labels: |
org.opencontainers.image.version=${{ steps.package-info.outputs.version }}
org.opencontainers.image.owner=${{ steps.package-info.outputs.owner }}
org.opencontainers.image.title=${{ steps.package-info.outputs.title }}
org.opencontainers.image.description=${{ steps.package-info.outputs.description }}
tags: |
type=raw,value=dev,enable=${{ github.event_name == 'pull_request' }}
type=raw,value=latest,enable=${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
type=raw,value=${{ steps.package-info.outputs.version }},enable=${{ steps.package-info.outputs.version != '' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
type=raw,value=${{ steps.package-info.outputs.major }},enable=${{ steps.package-info.outputs.major != '' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
type=raw,value=${{ steps.package-info.outputs.minor }},enable=${{ steps.package-info.outputs.minor != '' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
push: true