hashgraph / hedera-sourcify

Tools for verifying Hedera smart contracts using standard open source libraries.
Apache License 2.0
6 stars 7 forks source link

build: add unified workflow to publish both prod and integration images #178

Closed acuarica closed 4 months ago

acuarica commented 4 months ago

Description:

This PR merges both production and integration release image workflows into one.

Related issue(s):

Fixes #177.

Notes for reviewer:

To test this workflow you can use act https://nektosact.com/ to run actions locally.

[!IMPORTANT] Please note that while it is expected the act command itself fails due to Main Login to GitHub Container Registry, it is important you see in the output the expected line.

[!TIP] You may want to append --container-architecture linux/amd64 to each of these commands if you're using an Apple M-series chip.

push to main.

act push --workflows .github/workflows/push-images.yaml

The following line should appear in the console output

[Publish Images to GitHub Registry/docker-image-publish]   ⚙  ::set-env:: TAG=main

push vX.Y.Z tag

Create a file event.json

{
  "ref": "refs/tags/vX.Y.Z"
}
act push --workflows .github/workflows/push-images.yaml --eventpath event.json 

The following line should appear in the console output

[Publish Images to GitHub Registry/docker-image-publish]   ⚙  ::set-env:: TAG=X.Y.Z

workflow_dispatch.

act workflow_dispatch --workflows .github/workflows/push-images.yaml --input version=test

The following line should appear in the console output

[Publish Images to GitHub Registry/docker-image-publish]   ⚙  ::set-env:: TAG=test

Checklist