Skip to content

Commit

Permalink
GitHub workflows update
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeron committed Mar 17, 2022
1 parent d8823b1 commit 03729f5
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
56 changes: 56 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Publish Docker image

on:
release:
types:
- published

env:
GITHUB_REGISTRY_IMAGE: ghcr.io/${{ github.repository_owner }}/ikev2-strongswan-vpn
DOCKER_REGISTRY_IMAGE: docker.io/aeron/ikev2-strongswan-vpn

jobs:
build:
name: Build and push
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: recase
uses: ASzc/change-string-case-action@v2
with:
string: ${{ env.GITHUB_REGISTRY_IMAGE }}
- name: Set up QEMU
uses: docker/[email protected]
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
tags: >-
${{ steps.recase.outputs.lowercase }}:latest
${{ steps.recase.outputs.lowercase }}:${{ github.ref_name }}
${{ env.DOCKER_REGISTRY_IMAGE }}:latest
${{ env.DOCKER_REGISTRY_IMAGE }}:${{ github.ref_name }}
platforms: linux/amd64, linux/arm64
containerfiles: |
./dockerfile
- name: Log into GitHub Container Registry
uses: redhat-actions/podman-login@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Log into Docker Hub
uses: redhat-actions/podman-login@v1
with:
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to registries
uses: redhat-actions/push-to-registry@v2
with:
tags: ${{ steps.build-image.outputs.tags }}

0 comments on commit 03729f5

Please sign in to comment.