Git Product home page Git Product logo

Comments (3)

aegershman avatar aegershman commented on May 29, 2024 2

Hey @peter-evans + @adrianpaiva1 I think what you need is fetch-depth: 0:

From the actions/checkout docs

Number of commits to fetch. 0 indicates all history for all branches and tags.
Default: 1
fetch-depth: ''

Additionally, specifically, this section: https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches

Try this out:

jobs:
  repository-backup:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - uses: peter-evans/s3-backup@v1
        env:
          ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
          MIRROR_TARGET: ${{ secrets.MIRROR_TARGET }}
          SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }}
        with:
          args: --overwrite --remove

from s3-backup.

adrianpaiva1 avatar adrianpaiva1 commented on May 29, 2024 1

@aegershman Thank you so much, that looks like it worked.

from s3-backup.

peter-evans avatar peter-evans commented on May 29, 2024

Hi @adrianpaiva1

It just copies whatever files are available locally. If you want the entire git history then you need to make sure that is available locally when the action runs.

If you are using the checkout action it will only checkout one branch. So you probably won't have everything you need locally.

- uses: actions/checkout@v2

I'm not 100% sure how to make sure the .git folder contains all the information it needs to recover completely, but you would definitely need to checkout all the branches with full commit history, and all the tags. If you figure out the git commands to get a completely recoverable local copy, please let me know.

from s3-backup.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.