Skip to content

Commit

Permalink
Update ci (#4)
Browse files Browse the repository at this point in the history
* Update Makefile

* Update GHA
  • Loading branch information
snovikov authored Nov 16, 2022
1 parent 538c917 commit a771b74
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 52 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/backups.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
---

name: Backup Github Respository

# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
name: Backup Repository

on:
push:
Expand All @@ -13,11 +8,10 @@ on:

jobs:
backup:
uses: Flaconi/github-reusable-workflow/.github/workflows/backups.yml@stable
uses: Flaconi/github-reusable-workflow/.github/workflows/backups.yml@v1
with:
enabled: True
region: eu-central-1
secrets:
iam_role_arn: ${{ secrets.BACKUP_REPO_IAM_ROLE }}
bucket_name: ${{ secrets.BACKUP_REPO_BUCKET }}
git_read_token: ${{ secrets.REPO_READ_TOKEN }}
22 changes: 1 addition & 21 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
---

# -------------------------------------------------------------------------------------------------
# Job Name
# -------------------------------------------------------------------------------------------------
name: lint


# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on:
# Runs on Pull Requests
pull_request:


# -------------------------------------------------------------------------------------------------
# What to run
# -------------------------------------------------------------------------------------------------
jobs:
lint:
name: "Lint"
Expand All @@ -29,17 +16,10 @@ jobs:
- gen

steps:
# ------------------------------------------------------------
# Setup repository
# ------------------------------------------------------------
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

# ------------------------------------------------------------
# Lint repository
# ------------------------------------------------------------
- name: "make ${{ matrix.target }}"
run: |
retry() {
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
---
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master

permissions:
contents: write
pull-requests: write

jobs:
update_release_draft:
runs-on: ubuntu-latest
Expand Down
19 changes: 1 addition & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,16 @@
---

# -------------------------------------------------------------------------------------------------
# Job Name
# -------------------------------------------------------------------------------------------------
name: test


# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on:
# Runs on Pull Requests
pull_request:


# -------------------------------------------------------------------------------------------------
# What to run
# -------------------------------------------------------------------------------------------------
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:

# ------------------------------------------------------------
# Checkout repository
# ------------------------------------------------------------
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ test: _pull-tf
echo "------------------------------------------------------------"; \
echo "# Terraform init"; \
echo "------------------------------------------------------------"; \
if docker run $$(tty -s && echo "-it" || echo) --rm -v "$(CURRENT_DIR):/t" --workdir "$${DOCKER_PATH}" hashicorp/terraform:$(TF_VERSION) \
if docker run $$(tty -s && echo "-it" || echo) --rm --network host -v "$(CURRENT_DIR):/t" --workdir "$${DOCKER_PATH}" hashicorp/terraform:$(TF_VERSION) \
init \
-lock=false \
-upgrade \
Expand All @@ -88,7 +88,7 @@ test: _pull-tf
echo "OK"; \
else \
echo "Failed"; \
docker run $$(tty -s && echo "-it" || echo) --rm -v "$(CURRENT_DIR):/t" --workdir "$${DOCKER_PATH}" --entrypoint=rm hashicorp/terraform:$(TF_VERSION) -rf .terraform/ || true; \
docker run $$(tty -s && echo "-it" || echo) --rm -v "$(CURRENT_DIR):/t" --workdir "$${DOCKER_PATH}" --entrypoint=sh hashicorp/terraform:$(TF_VERSION) -c "rm -rf .terraform*" || true; \
exit 1; \
fi; \
echo; \
Expand All @@ -100,10 +100,10 @@ test: _pull-tf
$(ARGS) \
.; then \
echo "OK"; \
docker run $$(tty -s && echo "-it" || echo) --rm -v "$(CURRENT_DIR):/t" --workdir "$${DOCKER_PATH}" --entrypoint=rm hashicorp/terraform:$(TF_VERSION) -rf .terraform/ || true; \
docker run $$(tty -s && echo "-it" || echo) --rm -v "$(CURRENT_DIR):/t" --workdir "$${DOCKER_PATH}" --entrypoint=sh hashicorp/terraform:$(TF_VERSION) -c "rm -rf .terraform*" || true; \
else \
echo "Failed"; \
docker run $$(tty -s && echo "-it" || echo) --rm -v "$(CURRENT_DIR):/t" --workdir "$${DOCKER_PATH}" --entrypoint=rm hashicorp/terraform:$(TF_VERSION) -rf .terraform/ || true; \
docker run $$(tty -s && echo "-it" || echo) --rm -v "$(CURRENT_DIR):/t" --workdir "$${DOCKER_PATH}" --entrypoint=sh hashicorp/terraform:$(TF_VERSION) -c "rm -rf .terraform*" || true; \
exit 1; \
fi; \
echo; \
Expand Down

0 comments on commit a771b74

Please sign in to comment.