fix: wrong version and issue reference #2
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: Build and Push DCOR-CKAN Docker Images | |
on: | |
# Trigger the workflow on tag creation in X.Y.Z format, | |
# but only for the master branch | |
push: | |
branches: | |
- master | |
tags: | |
- '*.*.*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Set version tag from git tag | |
# Extract version from ref (e.g., refs/tags/0.0.1 => 0.0.1) | |
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Build and Push NGINX Image | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./nginx | |
file: ./nginx/Dockerfile | |
push: true | |
tags: | | |
${{ secrets.DOCKER_USERNAME }}/dcor-ckan-docker-nginx:${{ env.VERSION }} | |
${{ secrets.DOCKER_USERNAME }}/dcor-ckan-docker-nginx:latest | |
- name: Build and Push PostgreSQL Image | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./postgresql | |
file: ./postgresql/Dockerfile | |
push: true | |
tags: | | |
${{ secrets.DOCKER_USERNAME }}/dcor-ckan-docker-postgresql:${{ env.VERSION }} | |
${{ secrets.DOCKER_USERNAME }}/dcor-ckan-docker-postgresql:latest | |
- name: Build and Push CKAN Image | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./ckan | |
file: ./ckan/Dockerfile.dev # Build dcor image from dev | |
push: true | |
tags: | | |
${{ secrets.DOCKER_USERNAME }}/dcor-ckan-docker-ckan:${{ env.VERSION }} | |
${{ secrets.DOCKER_USERNAME }}/dcor-ckan-docker-ckan:latest |