Skip to content

Commit

Permalink
Fixes the docker publishing task (#26)
Browse files Browse the repository at this point in the history
chore(CI/CD): Fixes the script which fetches the current release version to tag the image
---------

Co-authored-by: Bogdan Vidrean <[email protected]>
  • Loading branch information
BogdanVidrean and Bogdan Vidrean authored Mar 29, 2023
1 parent 4b6f0d1 commit 3a05ad7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ jobs:
- uses: actions/checkout@v2
- name: Docker login
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Adds execution permissions to the script which extracts the current version
run: chmod +x scripts/get-current-version.sh
- name: Build and Publish to GPR
run: make docker-publish
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# (c) Copyright 2019-2023 OLX
[package]
name = "dali"
version = "1.3.0"
version = "1.4.0"
authors = ["Augusto César Dias <[email protected]>"]
edition = "2018"

Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ endif

SUDO := $(shell docker info >/dev/null 2>&1 || echo sudo)

.PHONY: up test build-base-image build-image
.PHONY: test run docker-build docker-publish

test:
./scripts/dali-tests-runner.sh
@ ./scripts/dali-tests-runner.sh

run:
cargo run
@ cargo run

docker-build:
docker build -t ${DALI_IMAGE_NAME}:${VERSION_TAG} .
@ docker build -t ${DALI_IMAGE_NAME}:${VERSION_TAG} .

docker-publish: docker-build
docker push ${DALI_IMAGE_NAME}:${VERSION_TAG}
@ docker push ${DALI_IMAGE_NAME}:${VERSION_TAG}
2 changes: 1 addition & 1 deletion scripts/get-current-version.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

awk -F ' = ' '$1 ~ /version/ { gsub(/[\"]/, "", $2); printf("%s",$2) }' Cargo.toml
awk -F ' = ' '$1 ~ /version/ { printf("%s",$2) }' Cargo.toml

0 comments on commit 3a05ad7

Please sign in to comment.