Skip to content

fix: use POSIX shell syntax for conditions #11

fix: use POSIX shell syntax for conditions

fix: use POSIX shell syntax for conditions #11

Workflow file for this run

name: Publish Docker images
on:
push:
tags:
- "v*"
# Allows running this workflow manually from the Actions tab
workflow_dispatch:
jobs:
push_to_registry:
name: Push Docker images to Docker Hub
if: github.repository == 'cybardev/resumake'
runs-on: ubuntu-latest
environment:
name: dockerhub
url: https://hub.docker.com/repositories/cybardev
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker [env img]
id: meta-env
uses: docker/metadata-action@v5
with:
images: |
cybardev/resumake-env
ghcr.io/cybardev/resumake-env
- name: Build and push Docker environment image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta-env.outputs.tags }}
labels: ${{ steps.meta-env.outputs.labels }}
- name: Extract metadata (tags, labels) for Docker [app img]
id: meta-app
uses: docker/metadata-action@v5
with:
images: |
cybardev/resumake
ghcr.io/cybardev/resumake
- name: Build and push Docker application image
uses: docker/build-push-action@v5
with:
context: .
file: ./resumake.Dockerfile
push: true
tags: ${{ steps.meta-app.outputs.tags }}
labels: ${{ steps.meta-app.outputs.labels }}