|
1 | | -# This is a basic workflow to help you get started with Actions |
2 | | - |
3 | 1 | name: Primer3 |
4 | 2 |
|
5 | | -# Controls when the action will run. |
6 | 3 | on: |
7 | | - # Triggers the workflow on push or pull request events but only for the master branch |
8 | 4 | push: |
9 | 5 | branches: [master] |
10 | 6 | pull_request: |
11 | 7 | branches: [master] |
12 | | - |
13 | | - # Allows you to run this workflow manually from the Actions tab |
14 | 8 | workflow_dispatch: |
15 | 9 |
|
16 | | -# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
17 | 10 | jobs: |
18 | | - # This workflow contains a single job called "build" |
19 | 11 | build: |
20 | | - # The type of runner that the job will run on |
21 | 12 | runs-on: ubuntu-latest |
22 | | - |
23 | | - # Steps represent a sequence of tasks that will be executed as part of the job |
24 | 13 | steps: |
25 | | - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
26 | | - - uses: actions/checkout@v2 |
| 14 | + - uses: actions/checkout@v4 |
27 | 15 |
|
28 | | - # Runs a set of commands using the runners shell |
29 | 16 | - name: Build Primer3 |
30 | 17 | run: | |
31 | 18 | cd lambda |
32 | 19 | make |
33 | 20 |
|
34 | | - - name: Build and Publish to Registry |
35 | | - uses: elgohr/Publish-Docker-Github-Action@master |
| 21 | + - name: Set up Docker Buildx |
| 22 | + uses: docker/setup-buildx-action@v3 |
| 23 | + |
| 24 | + - name: Login to Docker Hub |
| 25 | + if: github.event_name != 'pull_request' |
| 26 | + uses: docker/login-action@v3 |
36 | 27 | with: |
37 | | - name: ${{secrets.DOCKER_USERNAME}}/mutation-maker-primer3 |
38 | 28 | username: ${{ secrets.DOCKER_USERNAME }} |
39 | 29 | password: ${{ secrets.DOCKER_PASSWORD }} |
40 | | - dockerfile: Dockerfile |
41 | | - workdir: lambda |
| 30 | + |
| 31 | + - name: Build and push |
| 32 | + uses: docker/build-push-action@v5 |
| 33 | + with: |
| 34 | + context: ./lambda |
| 35 | + push: ${{ github.event_name != 'pull_request' }} |
| 36 | + tags: ${{ secrets.DOCKER_USERNAME }}/mutation-maker-primer3:latest |
0 commit comments