add more #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Django # workflow name | ||
on: | ||
push: | ||
branches: # similar to "only" in GitLab | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 # similar to "image" in GitLab | ||
steps: | ||
- run: echo "This is a build step" # similar to "script" in GitLab | ||
test: | ||
runs-on: ubuntu-20.04 | ||
needs: build | ||
steps: | ||
- run: echo "This is a test step" | ||
integration: | ||
runs-on: ubuntu-20.04 | ||
needs: test | ||
steps: | ||
- run: echo "This is an integration step" | ||
- run: exit 1 | ||
continue-on-error: true | ||
prod: | ||
runs-on: ubuntu-20.04 | ||
needs: integration | ||
steps: | ||
- run: echo "This is a deploy step" | ||
artifact: | ||
needs: prod | ||
runs-on: ubuntu-20.04 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: hello-artifact | ||
path: hello.txt | ||
retention-days: 5 | ||
steps: | ||
- run: echo "hello" > hello.txt |