Skip to content

Commit

Permalink
Merge pull request #180 from Automattic/pin-actions
Browse files Browse the repository at this point in the history
chore: pin actions
  • Loading branch information
sjinks authored May 27, 2024
2 parents eaf9c7f + b18c922 commit dc1c832
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 27 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
image: ${{ fromJson(needs.prepare.outputs.images) }}
steps:
- name: Check out the repo
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
fetch-depth: 0

Expand All @@ -62,7 +62,7 @@ jobs:
fi
- name: Expose GitHub Runtime
uses: Automattic/vip-actions/expose-github-runtime@trunk
uses: Automattic/vip-actions/expose-github-runtime@e1faabf165941008de4c0c1381df153e49d8ad2c # v0.6.0

- name: Set up Docker
uses: crazy-max/ghaction-setup-docker@5bddaa4323ffd60efb2b5045b75b9637c12d4e50 # v3.2.0
Expand All @@ -75,15 +75,15 @@ jobs:
}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
if: steps.changes.outputs.needs_build == 'true'

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
if: steps.changes.outputs.needs_build == 'true'

- name: Log in to GitHub Docker Registry
uses: docker/login-action@v3
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
if: steps.changes.outputs.needs_build == 'true'
with:
registry: https://ghcr.io
Expand Down Expand Up @@ -115,10 +115,6 @@ jobs:
run: npm install -g @devcontainers/cli
if: ${{ steps.changes.outputs.needs_build == 'true' && steps.exists.outputs.exists != 'true' }}

- name: Expose GitHub Runtime
uses: Automattic/vip-actions/expose-github-runtime@trunk
if: ${{ steps.changes.outputs.needs_build == 'true' && steps.exists.outputs.exists != 'true' }}

- name: Build image
run: |
devcontainer build \
Expand All @@ -145,7 +141,7 @@ jobs:
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
fetch-depth: 0

Expand All @@ -167,7 +163,7 @@ jobs:
fi
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v3
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
registry: https://ghcr.io
username: ${{ github.actor }}}
Expand All @@ -190,7 +186,7 @@ jobs:
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
fetch-depth: 0

Expand All @@ -212,7 +208,7 @@ jobs:
fi
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v3
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
registry: https://ghcr.io
username: ${{ github.actor }}}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
fetch-depth: 0

Expand All @@ -52,19 +52,19 @@ jobs:
fi
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
if: steps.changes.outputs.needs_build == 'true'

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
if: steps.changes.outputs.needs_build == 'true'

- name: Install @devcontainers/cli
run: npm install -g @devcontainers/cli
if: steps.changes.outputs.needs_build == 'true'

- name: Expose GitHub Runtime
uses: Automattic/vip-actions/expose-github-runtime@trunk
uses: Automattic/vip-actions/expose-github-runtime@e1faabf165941008de4c0c1381df153e49d8ad2c # v0.6.0
if: steps.changes.outputs.needs_build == 'true'

- name: Build image
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ jobs:
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Generate documentation
uses: devcontainers/action@v1.4.2
uses: devcontainers/action@528049dce833673f136ddfc09c2720d450029a6b # v1.4.2
with:
generate-docs: true
base-path-to-features: ./features/src

- name: Create a PR for documentation
uses: peter-evans/create-pull-request@v6.0.5
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
with:
add-paths: ':(glob)features/src/**/README.md'
commit-message: 'docs: automated documentation update'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sanity-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the source code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Add error matcher
run: echo "::add-matcher::$(pwd)/.github/problem-matcher-gcc.json"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
BUILDKIT_PROGRESS: plain
steps:
- name: Check out the repo
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Copy features
working-directory: test
Expand All @@ -55,10 +55,10 @@ jobs:
sed -i 's!ghcr.io/automattic/vip-codespaces/!./.devcontainer/features/!' .devcontainer/features/*/devcontainer-feature.json
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0

- name: Expose GitHub Runtime
uses: Automattic/vip-actions/expose-github-runtime@trunk
uses: Automattic/vip-actions/expose-github-runtime@e1faabf165941008de4c0c1381df153e49d8ad2c # v0.6.0

- name: Install @devcontainers/cli
run: npm install -g @devcontainers/cli
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Validate devcontainer-feature.json files
uses: devcontainers/action@v1.4.2
uses: devcontainers/action@528049dce833673f136ddfc09c2720d450029a6b # v1.4.2
with:
validate-only: "true"
base-path-to-features: "./features/src"

0 comments on commit dc1c832

Please sign in to comment.