0
0
Gitdevops~10 mins

Deployment triggers from tags in Git - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to list all tags in the repository.

Git
git [1]
Drag options to blanks, or click blank then click option'
Atag
Bbranch
Ccommit
Dcheckout
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git branch' lists branches, not tags.
Using 'git commit' shows commits, not tags.
2fill in blank
medium

Complete the command to create a new tag named 'v1.0'.

Git
git [1] v1.0
Drag options to blanks, or click blank then click option'
Apush
Bcheckout
Ccommit
Dtag
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git push' sends data to remote but does not create tags.
Using 'git checkout' switches branches, not tags.
3fill in blank
hard

Fix the error in the command to push tags to the remote repository.

Git
git push origin [1]
Drag options to blanks, or click blank then click option'
A--tags
Bbranch
Ccommit
DHEAD
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'branch' or 'HEAD' pushes branches, not tags.
Using 'commit' is invalid in this context.
4fill in blank
hard

Fill in the blank to complete the GitHub Actions trigger for tags starting with 'v'.

Git
on:
  push:
    tags:
      - '[1]*'
Drag options to blanks, or click blank then click option'
Atag-
Brelease-
Cv
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'release-' or 'tag-' prefixes do not match version tags starting with 'v'.
5fill in blank
hard

Fill both blanks to complete the GitHub Actions job that runs only on tag pushes starting with 'v'.

Git
jobs:
  deploy:
    if: startsWith(github.ref, 'refs/tags/[1][2]')
    runs-on: ubuntu-latest
    steps:
      - name: Deploy
        run: echo "Deploying version tag"
Drag options to blanks, or click blank then click option'
Av
B-
C*
Drelease
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'release' instead of 'v-' causes the condition to fail.