-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #219 from D10S0VSkY-OSS/refactor/github_actions
🐛fix: terragrunt download tf if no exist
- Loading branch information
Showing
7 changed files
with
41 additions
and
27 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 |
---|---|---|
@@ -1,40 +1,40 @@ | ||
name: SLD Remote State Docker Image CI | ||
|
||
on: | ||
# Triggers the workflow on push events but only for the main branch | ||
push: | ||
branches: [ master ] | ||
# Allows you to run this workflow manually from the Actions tab | ||
release: | ||
types: [created] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
build-and-push: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: docker login | ||
|
||
# Login to Docker Hub | ||
- name: Docker login | ||
env: | ||
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
run: | | ||
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | ||
run: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | ||
|
||
- name: Build the Docker image with tags | ||
# Build and push the Docker image with new tag for releases | ||
- name: Build and push Docker image with new tag | ||
if: github.event_name == 'release' | ||
working-directory: ./sld-remote-state | ||
run: docker build . --file Dockerfile --tag ${{ secrets.DOCKER_USERNAME }}/sld-remote-state:2.11.0 | ||
|
||
- name: Docker Push with tags | ||
#if: github.event.pull_request.merged == true | ||
run: docker push ${{ secrets.DOCKER_USERNAME }}/sld-remote-state:2.11.0 | ||
run: | | ||
TAG=$(echo $GITHUB_REF | sed 's/refs\/tags\///') | ||
docker build . --file Dockerfile --tag ${{ secrets.DOCKER_USERNAME }}/sld-remote-state:$TAG | ||
docker push ${{ secrets.DOCKER_USERNAME }}/sld-remote-state:$TAG | ||
- name: Build the Docker image | ||
# Build and push the Docker image with 'latest' tag for master branch | ||
- name: Build and push Docker image with latest tag | ||
if: github.ref == 'refs/heads/master' | ||
working-directory: ./sld-remote-state | ||
run: docker build . --file Dockerfile --tag ${{ secrets.DOCKER_USERNAME }}/sld-remote-state:latest | ||
|
||
- name: Docker Push | ||
#if: github.event.pull_request.merged == true | ||
run: docker push ${{ secrets.DOCKER_USERNAME }}/sld-remote-state:latest | ||
|
||
run: | | ||
docker build . --file Dockerfile --tag ${{ secrets.DOCKER_USERNAME }}/sld-remote-state:latest | ||
docker push ${{ secrets.DOCKER_USERNAME }}/sld-remote-state:latest |
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
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
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
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
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
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