-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: EOEFANS SPIDER Docker Image CI | ||
|
|
||
| on: | ||
| push: | ||
| tags: ["v*.*.*"] | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| IMAGE_REGISTRY: "containers.vlink.dev" | ||
| IMAGE_REPO: "eoefans" | ||
| IMAGE_NAME: "eoefans-spider" | ||
| DOCKERFILE_PATH: "./builder/spider/Dockerfile" | ||
| # IMAGE_TAG: "" #we get tag using the action down below | ||
|
|
||
| jobs: | ||
|
|
||
| build: | ||
|
|
||
| runs-on: [ self-hosted, Linux ] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
|
|
||
| - name: Get tag | ||
| id: tag | ||
| uses: dawidd6/action-get-tag@v1 | ||
|
|
||
| - run: | | ||
| echo "IMAGE_TAG=${{steps.tag.outputs.tag}}" >> $GITHUB_ENV | ||
| echo $GITHUB_ENV | ||
| - name: Log in to VLINK Container Registry | ||
| uses: docker/login-action@v2 | ||
| with: | ||
| registry: ${{ env.IMAGE_REGISTRY }} | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Build the Docker image with tag | ||
| run: docker build . --file ${{ env.DOCKERFILE_PATH }} --tag ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} | ||
|
|
||
| - name: push docker image with tag | ||
| run: docker push ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} | ||
|
|
||
| - name: re-tag the image to latest version | ||
| run: docker tag ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:latest | ||
|
|
||
| - name: push latest docker image | ||
| run: docker push ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:latest |