Skip to content

Commit

Permalink
update build-and-publish workflow to use official actions
Browse files Browse the repository at this point in the history
[tag/2.319.1]
  • Loading branch information
IreshMM committed Sep 22, 2024
1 parent 65343c5 commit 2556e41
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions .github/workflows/build-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,28 @@ env:

jobs:
docker:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build/Publish Image
uses: mobilecoinofficial/gh-actions/docker@v0
with:
dockerfile: ./Dockerfile
flavor: latest=true
images: ireshmm/gha-runner
password: ${{ secrets.DOCKERHUB_TOKEN }}
push: ${{ github.event_name == 'pull_request' && 'false' || 'true' }}
tags: |
type=semver,pattern={{version}},priority=20
type=sha,priority=10
username: ${{ secrets.DOCKERHUB_USERNAME }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ireshmm/gha-runner
tags: |
type=semver,pattern={{version}},priority=20
type=sha,priority=10
-
name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit 2556e41

Please sign in to comment.