Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid making API requests for GitHub API #8

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/depup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,31 @@ jobs:
branch: depup/reviewdog
base: main
labels: "bump:minor"
terraform:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-depup@v1
id: depup
with:
file: Dockerfile
version_name: TERRAFORM_VERSION
repo: hashicorp/terraform

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "chore(deps): update terraform to ${{ steps.depup.outputs.latest }}"
commit-message: "chore(deps): update terraform to ${{ steps.depup.outputs.latest }}"
body: |
Update terraform to [v${{ steps.depup.outputs.latest }}](https://github.com/hashicorp/terraform/releases/tag/v${{ steps.depup.outputs.latest }})
Compare [v${{ steps.depup.outputs.current }}...v${{ steps.depup.outputs.latest }}](https://github.com/hashicorp/terraform/compare/v${{ steps.depup.outputs.current }}...v${{ steps.depup.outputs.latest }})

This PR is auto generated by [depup workflow](https://github.com/${{ github.repository }}/actions?query=workflow%3Adepup).
branch: depup/terraform
base: main
labels: "bump:minor"
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM alpine:3.19

ENV REVIEWDOG_VERSION=v0.17.1
ENV TERRAFORM_VERSION=latest
ENV TERRAFORM_VERSION=1.7.3

SHELL ["/bin/ash", "-eo", "pipefail", "-c"]

Expand All @@ -10,10 +10,7 @@ RUN apk --no-cache add git=2.43.0-r0 jq=1.7.1-r0

RUN wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b /usr/local/bin/ ${REVIEWDOG_VERSION}

RUN if [ "${TERRAFORM_VERSION}" = "latest" ]; then \
TERRAFORM_VERSION=$(wget -qO - https://api.github.com/repos/hashicorp/terraform/releases/latest | jq --raw-output '.tag_name' | cut -c 2-); \
fi \
&& wget -q https://releases.hashicorp.com/terraform/"${TERRAFORM_VERSION}"/terraform_"${TERRAFORM_VERSION}"_linux_amd64.zip \
RUN wget -q https://releases.hashicorp.com/terraform/"${TERRAFORM_VERSION}"/terraform_"${TERRAFORM_VERSION}"_linux_amd64.zip \
&& unzip ./terraform_"${TERRAFORM_VERSION}"_linux_amd64.zip -d /usr/local/bin/ \
&& rm -rf ./terraform_"${TERRAFORM_VERSION}"_linux_amd64.zip

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ inputs:
default: ''
### Variables for Terraform ###
terraform_version:
description: 'The terraform version to install and use. The default is `latest`'
description: 'The terraform version to install and use.'
```

## Usage
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ inputs:
default: ''
### Variables for terraform validate ###
terraform_version:
description: 'The terraform version to install and use. The default is `latest`'
description: 'The terraform version to install and use.'
runs:
using: 'docker'
image: 'Dockerfile'
Expand Down