File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build image from a tag and push it to Quay.io
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *' # Trigger for all tags
7+
8+ env :
9+ IMAGE_NAME : lightspeed-stack
10+ IMAGE_NAMESPACE : lightspeed-core
11+ REGISTRY : quay.io
12+ GIT_TAG : ${{ github.ref_name }}
13+ LATEST_TAG : latest
14+ CONTAINER_FILE : Containerfile
15+
16+ jobs :
17+ build-and-push-release :
18+ runs-on : ubuntu-latest
19+ permissions :
20+ contents : read
21+ # Required for image pushing to a registry
22+ packages : write
23+ steps :
24+ - name : Install buildah
25+ run : |
26+ sudo apt update
27+ sudo apt install -y buildah
28+ - name : Checkout code
29+ uses : actions/checkout@v4
30+ - name : Build image with Buildah
31+ uses : redhat-actions/buildah-build@v2
32+ with :
33+ image : ${{ env.IMAGE_NAME }}
34+ tags : |
35+ ${{ env.GIT_TAG }}
36+ ${{ env.LATEST_TAG }}
37+ containerfiles : |
38+ ${{ env.CONTAINER_FILE }}
39+ oci : true
40+ - name : Push image to Quay.io
41+ uses : redhat-actions/push-to-registry@v2
42+ with :
43+ image : ${{ steps.build_image.outputs.image }}
44+ tags : ${{ steps.build_image.outputs.tags }}
45+ registry : ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAMESPACE }}
46+ username : ${{ secrets.QUAY_REGISTRY_USERNAME }}
47+ password : ${{ secrets.QUAY_REGISTRY_PASSWORD }}
You can’t perform that action at this time.
0 commit comments